From 8ea02c9dd13368ec702fef08f40b83401ba84d0d Mon Sep 17 00:00:00 2001 From: Asocia Date: Sat, 17 Jul 2021 23:14:16 +0300 Subject: [PATCH] Configure i3lock-color --- .config/i3/config | 4 +++- scripts/misc/i3-lock.sh | 42 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100755 scripts/misc/i3-lock.sh diff --git a/.config/i3/config b/.config/i3/config index 2d6952e..8853fc8 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -24,7 +24,7 @@ font pango:monospace 8 # xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the # screen before suspend. Use loginctl lock-session to lock your screen. -exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork +# exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork # NetworkManager is the most popular way to manage wireless networks on Linux, # and nm-applet is a desktop environment-independent system tray GUI for it. @@ -72,6 +72,8 @@ bindsym $mod+Shift+e exec $rofi powermenu bindsym --release Print exec maim -u ~/Pictures/Screenshots/`date +%Y-%m-%d_%H:%M:%S`.png bindsym --release Shift+Print exec -u maim -s ~/Pictures/Screenshots/`date +%Y-%m-%d_%H:%M:%S`.png +bindsym $mod+Ctrl+l exec --no-startup-id ~/scripts/misc/i3-lock.sh + # Bind brightness keys to light interface bindsym XF86MonBrightnessUp exec light -A 5 diff --git a/scripts/misc/i3-lock.sh b/scripts/misc/i3-lock.sh new file mode 100755 index 0000000..b3321a1 --- /dev/null +++ b/scripts/misc/i3-lock.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +B='#00000000' # blank +C='#ffffff22' # clear ish +# D='#ff00ffcc' # default +# T='#ee00eeee' # text +# W='#880000bb' # wrong +# V='#bb00bbbb' # verifying + +D="$(xrdb -query | grep "*.color12\b" | cut -d":" -f2 | xargs)cc" +T="$(xrdb -query | grep "*.color13\b" | cut -d":" -f2 | xargs)ee" +W="$(xrdb -query | grep "*.color1\b" | cut -d":" -f2 | xargs)bb" +V="$(xrdb -query | grep "*.color6\b" | cut -d":" -f2 | xargs)bb" + + +i3lock \ +--insidever-color=$C \ +--ringver-color=$V \ +\ +--insidewrong-color=$C \ +--ringwrong-color=$W \ +\ +--inside-color=$B \ +--ring-color=$D \ +--line-color=$B \ +--separator-color=$D \ +\ +--verif-color=$T \ +--wrong-color=$T \ +--time-color=$T \ +--date-color=$T \ +--layout-color=$T \ +--keyhl-color=$W \ +--bshl-color=$W \ +\ +--screen 1 \ +--blur 5 \ +--clock \ +--indicator \ +--time-str="%H:%M:%S" \ +--date-str="%A, %m %Y" \ +--keylayout 1 \