Files
.dotfiles/.config/sway/scripts/lockman.sh
2024-03-21 12:35:55 +01:00

10 lines
305 B
Bash
Executable File

#!/bin/sh
# Times the screen off and puts it to background
swayidle \
timeout 5 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' &
# Locks the screen immediately
swaylock -C ~/.config/sway/swaylock/config
# Kills last background task so idle timer doesn't keep running
kill %%