2022-12-11 09:26:14 +03:00
|
|
|
#!/bin/sh
|
|
|
|
# Times the screen off and puts it to background
|
2024-01-01 17:10:43 +03:00
|
|
|
grim /tmp/lockscreen.png && convert -filter Gaussian -resize 20% -blur 0x2.5 -resize 500% /tmp/lockscreen.png /tmp/lockscreen.png
|
2022-12-11 09:26:14 +03:00
|
|
|
swayidle \
|
|
|
|
timeout 10 'swaymsg "output * dpms off" && brightnessctl -d kbd_backlight set 0%' \
|
2023-06-10 15:23:06 +03:00
|
|
|
resume 'swaymsg "output * dpms on"' \
|
2024-01-01 17:10:43 +03:00
|
|
|
before-sleep 'swaylock -i /tmp/lockscreen --font JetBrains\ Mono' &
|
2022-12-11 09:26:14 +03:00
|
|
|
# Locks the screen immediately
|
2024-01-01 17:10:43 +03:00
|
|
|
swaylock -i /tmp/lockscreen.png -s stretch --font JetBrains\ Mono
|
2022-12-11 09:26:14 +03:00
|
|
|
# Kills last background task so idle timer doesn't keep running
|
|
|
|
kill %%
|
2024-01-01 17:10:43 +03:00
|
|
|
rm /tmp/lockscreen.png
|