dotfiles/home/.local/bin/scripts/gui/hyprland/toggle-idle

13 lines
294 B
Text
Raw Normal View History

#!/usr/bin/env bash
2024-02-19 01:56:00 +01:00
set -euo pipefail
2022-10-30 19:33:47 +01:00
2025-02-25 00:19:56 +01:00
serv="hypridle.service"
2024-02-19 01:56:00 +01:00
2025-02-25 00:19:56 +01:00
if systemctl --user is-active --quiet "$serv"; then
systemctl --user stop "$serv"
notify-send "Idle-Toggle" "Idle timeouts disabled"
2022-10-30 19:33:47 +01:00
else
2025-02-25 00:19:56 +01:00
systemctl --user start "$serv"
notify-send "Idle-Toggle" "Idle timeouts enabled"
2022-10-30 19:33:47 +01:00
fi