dotfiles/configs/sway/lock.sh

10 lines
398 B
Bash
Raw Normal View History

2022-11-20 10:49:12 +03:00
#!/bin/sh
# Times the screen off and puts it to background
swayidle \
timeout 10 'swaymsg "output * dpms off" && brightnessctl -d kbd_backlight set 0%' \
resume 'swaymsg "output * dpms on" && brightnessctl -d kbd_backlight set 30%' &
2022-11-20 10:49:12 +03:00
# Locks the screen immediately
2022-12-08 18:15:43 +03:00
swaylock -c 181924 -s stretch --font JetBrains\ Mono
2022-11-20 10:49:12 +03:00
# Kills last background task so idle timer doesn't keep running
kill %%