diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-06-28 21:07:30 +0300 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-06-28 21:07:30 +0300 |
| commit | a3a26d8246d7215bb1ffb782e48f11eeaf8181ba (patch) | |
| tree | eb122fdbb744f35b41a2b3b5f28e4572b99f54e4 | |
| parent | d11b4aead8f853213ca2f906ef81e13ef443b225 (diff) | |
| download | dotfiles-a3a26d8246d7215bb1ffb782e48f11eeaf8181ba.tar dotfiles-a3a26d8246d7215bb1ffb782e48f11eeaf8181ba.tar.gz dotfiles-a3a26d8246d7215bb1ffb782e48f11eeaf8181ba.zip | |
Updated lock script to lock in a more secure manner and made it lock on lid closing
| -rw-r--r-- | .config/openbox/autostart | 1 | ||||
| -rwxr-xr-x | .i3lock/lock.sh | 25 |
2 files changed, 13 insertions, 13 deletions
diff --git a/.config/openbox/autostart b/.config/openbox/autostart index 8223e19..5636217 100644 --- a/.config/openbox/autostart +++ b/.config/openbox/autostart @@ -14,6 +14,7 @@ dunst & # notification daemon lxpolkit & # polkit barrier & # using mouse & keyboard on other computers while connected to wifi xautolock -detectsleep -secure -time 15 -locker ~/.i3lock/lock.sh & # auto lock screen +xss-lock -- .i3lock/lock.sh suspend & # lock screen on lid closing; you'll also need to uncomment the HandleLidSwitch variable and assign to it "lock" (HandleLidSwitch=lock) inside /etc/systemd/logind.conf tint2 & # taskbar picom --experimental-backends & # compositor setxkbmap -layout "us,bg" -variant ",phonetic" -option "grp:alt_shift_toggle" & # keyboard switching diff --git a/.i3lock/lock.sh b/.i3lock/lock.sh index 1c2a304..eec9c69 100755 --- a/.i3lock/lock.sh +++ b/.i3lock/lock.sh @@ -4,9 +4,17 @@ if [ $(grep -r "RUNNING" /proc/asound | wc -l) -eq 0 ] || [[ $# -ne 0 ]]; then # Disables dunst, my notification daemon, so I don't see notification on lock screen # https://github.com/dunst-project/dunst/issues/697 # https://wiki.archlinux.org/title/Dunst#Disable_dunst_temporarily - dunstctl set-paused true + # The first line is normal i3lock arguments, while the rest of the lines are i3lock-color ones + # If you want to use i3lock, remove those lines (and the \ at the end) + # But I hightly advise you to use i3lock-color, it's amazing: https://github.com/Raymo111/i3lock-color + i3lock -f -c d49408 -i /home/kamen/.i3lock/lockscreen.png \ + -F -k --indicator --keylayout 1 --radius 95 --pass-volume-keys \ + --date-str="%d.%m.%Y" --verif-text="Verifying…" --wrong-text="Wrong!" --noinput-text="No Input!" \ + --insidever-color d47408cc --ringver-color d47408 --insidewrong-color c35b5bcc --ringwrong-color c35b5b \ + --layout-color ffeede --time-color ffeede --date-color ffeede --greeter-color ffeede --verif-color ffeede --wrong-color ffeede + if [[ "$1" == "suspend" ]]; then # Apps that are playing audio could stop being able to play audio after suspend (to fix, restart app) # By restarting pipewire, I try to make sure that any audio that might be playing, stops @@ -22,20 +30,11 @@ if [ $(grep -r "RUNNING" /proc/asound | wc -l) -eq 0 ] || [[ $# -ne 0 ]]; then # # kamen ALL = (root) NOPASSWD: /usr/local/sbin/sleep.sh sudo -u root /usr/local/sbin/sleep.sh - fi - - # The first line is normal i3lock arguments, while the rest of the lines are i3lock-color ones - # If you want to use i3lock, remove those lines (and the \ at the end) - # But I hightly advise you to use i3lock-color, it's amazing: https://github.com/Raymo111/i3lock-color - i3lock -f -c d49408 -i /home/kamen/.i3lock/lockscreen.png -n \ - -F -k --indicator --keylayout 1 --radius 95 --pass-volume-keys \ - --date-str="%d.%m.%Y" --verif-text="Verifying…" --wrong-text="Wrong!" --noinput-text="No Input!" \ - --insidever-color d47408cc --ringver-color d47408 --insidewrong-color c35b5bcc --ringwrong-color c35b5b \ - --layout-color ffeede --time-color ffeede --date-color ffeede --greeter-color ffeede --verif-color ffeede --wrong-color ffeede + sleep 0.5 # a hack to make sure it doesn't execute anything, after being put to sleep but before everything sleeps - dunstctl set-paused false # Enables my notification daemon - if [[ "$1" == "suspend" ]]; then pkill tint2; gtk-launch tint2 # sometimes tint2 get's messed up and transparency breaks, this makes sure that this doesn't happen gtk-launch picom # sometimes my compositor stops working after suspend, this makes sure it's running fi + + dunstctl set-paused false # Enables my notification daemon fi |
