mirror of
https://github.com/ivabus/dotfiles
synced 2024-11-10 02:05:16 +03:00
sway/lock.sh: blur screen instead of plain color
Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
This commit is contained in:
parent
f5cf589677
commit
4d868f5345
|
@ -1,10 +1,12 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Times the screen off and puts it to background
|
# Times the screen off and puts it to background
|
||||||
|
grim /tmp/lockscreen.png && convert -filter Gaussian -resize 20% -blur 0x2.5 -resize 500% /tmp/lockscreen.png /tmp/lockscreen.png
|
||||||
swayidle \
|
swayidle \
|
||||||
timeout 10 'swaymsg "output * dpms off" && brightnessctl -d kbd_backlight set 0%' \
|
timeout 10 'swaymsg "output * dpms off" && brightnessctl -d kbd_backlight set 0%' \
|
||||||
resume 'swaymsg "output * dpms on"' \
|
resume 'swaymsg "output * dpms on"' \
|
||||||
before-sleep 'swaylock -c 181924 --font JetBrains\ Mono' &
|
before-sleep 'swaylock -i /tmp/lockscreen --font JetBrains\ Mono' &
|
||||||
# Locks the screen immediately
|
# Locks the screen immediately
|
||||||
swaylock -c 181924 -s stretch --font JetBrains\ Mono
|
swaylock -i /tmp/lockscreen.png -s stretch --font JetBrains\ Mono
|
||||||
# Kills last background task so idle timer doesn't keep running
|
# Kills last background task so idle timer doesn't keep running
|
||||||
kill %%
|
kill %%
|
||||||
|
rm /tmp/lockscreen.png
|
||||||
|
|
Loading…
Reference in a new issue