feat(nix): toggle idle

This commit is contained in:
Barrett Ruth 2026-02-17 00:03:48 -05:00
parent 0d378b4f78
commit 675c57ae1b
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
3 changed files with 30 additions and 20 deletions

View file

@ -412,8 +412,17 @@ power)
"$shutdown") systemctl poweroff ;;
esac
;;
idle)
require notify-send
if pkill hypridle; then
notify-send -a ctl -t 2500 'idle off'
else
hypridle &
notify-send -a ctl -t 2500 'idle on'
fi
;;
*)
echo "Usage: ctl {screenshot|ocr|keyboard|audio|wifi|brightness|volume|media|wallpaper|power}" >&2
echo "Usage: ctl {screenshot|ocr|keyboard|audio|wifi|brightness|volume|media|wallpaper|power|idle}" >&2
exit 1
;;
esac