diff --git a/i3/config b/i3/config index 3965715..7fdcfcd 100644 --- a/i3/config +++ b/i3/config @@ -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 diff --git a/i3/scripte/lock.sh b/i3/scripte/lock.sh index 576a470..881bbe4 100755 --- a/i3/scripte/lock.sh +++ b/i3/scripte/lock.sh @@ -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 + diff --git a/i3/scripte/lockscreen.sh b/i3/scripte/lockscreen.sh deleted file mode 100755 index c986b85..0000000 --- a/i3/scripte/lockscreen.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -xautolock -detectsleep -time 15 -locker "xset dpms force off && i3lock --ignore-empty-password --color 000000"