nixos/scrappy/dotfiles/sway/scripts/lockman.sh

10 lines
275 B
Bash
Raw Normal View History

2024-10-11 19:14:23 -06:00
#!/bin/sh
# Times the screen off and puts it to background
swayidle \
timeout 300 'swaymsg "output * power off"' \
resume 'swaymsg "output * power on"' &
# Locks the screen immediately
swaylock
# Kills last background task so idle timer doesn't keep running
kill %%