i3: lockscreen

This commit is contained in:
Michael Grote 2022-07-15 23:37:14 +02:00
parent e06b008f13
commit 45ceece334
3 changed files with 20 additions and 9 deletions

View file

@ -11,11 +11,9 @@ font pango:monospace 8
# setze "urgency hint" nicht sofort zurück
force_display_urgency_hint 5000 ms
# execute lockscreen.sh; sperrt rechner nach x min
exec_always --no-startup-id ~/dotfiles/i3/scripte/lockscreen.sh
# enter lockscreen manually
bindsym $mod1+l exec --no-startup-id ~/dotfiles/i3/scripte/lock.sh
# lockscreen mit Win+L oder nach Wartezeit
bindsym $mod1+l exec "~/dotfiles/i3/scripte/lock.sh"
exec_always xautolock -time 10 -locker "~/dotfiles/i3/scripte/lock.sh"
# dimm screen
exec_always --no-startup-id ~/dotfiles/i3/scripte/dimming.sh

View file

@ -1,2 +1,17 @@
#!/bin/bash
xset dpms force off && i3lock --ignore-empty-password --color 000000
#!/bin/sh -e
# Take a screenshot
scrot /tmp/screen_locked.png
# Pixellate it 10x
mogrify -scale 10% -scale 1000% /tmp/screen_locked.png
# Lock screen displaying this image.
i3lock -i /tmp/screen_locked.png
# delete Image
rm -f /tmp/screen_locked.png
# Turn the screen off after a delay.
sleep 60; pgrep i3lock && xset dpms force off

View file

@ -1,2 +0,0 @@
#!/bin/bash
xautolock -detectsleep -time 15 -locker "xset dpms force off && i3lock --ignore-empty-password --color 000000"