Files
nix-config/home/linux/gui/hyprland/conf/scripts/lockscreen

10 lines
285 B
Bash
Executable File

#!/usr/bin/env bash
# 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 %%