Configure i3lock-color

This commit is contained in:
Asocia 2021-07-17 23:14:16 +03:00
parent 0017aa63d9
commit 8ea02c9dd1
2 changed files with 45 additions and 1 deletions

View File

@ -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

42
scripts/misc/i3-lock.sh Executable file
View File

@ -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 \