Files
dotfiles/swaync/scripts/idle_inhibit_toggle.sh
Nikolai Papin e251ac2fff feat: reserved screen space keybind and pinning windows for watching shows in the background;
refactor: waybar adjustments;
refactor: swaync idle inhibitor now handles idle state correctly;
feat: rmpc config
2025-09-22 17:48:56 +03:00

11 lines
402 B
Bash
Executable File

kill -0 $(<\"$XDG_RUNTIME_DIR/swaync-idle.pid\") && echo true || echo false
if [ $1 == "on" ]; then
pkill hypridle
systemd-inhibit --why='User request via swaync' --what=sleep:handle-lid-switch sh -c 'echo \"$$\" > \"$XDG_RUNTIME_DIR/swaync-idle.pid\"; while true; do sleep 3600; done'
elif [ $2 == "off" ]; then
hypridle & disown
kill $(<\"$XDG_RUNTIME_DIR/swaync-idle.pid\")
else
exit 1
fi