Add system-sleep-menu.sh

This commit is contained in:
2023-11-27 19:26:54 -08:00
parent 45995c6924
commit 6964a43e42
2 changed files with 27 additions and 6 deletions

View File

@ -0,0 +1,20 @@
#!/usr/bin/env zsh
pgrep swayidle && swayidle_state="Enabled" || swayidle_state="Disabled"
choice="$(fuzzel --index -d -p "Cur: ${swayidle_state} > " <<'EOF'
Enable
Disable
EOF
)"
(( ${?} != 0 )) && exit
case "${choice}" in
0)
swayidle &
;;
1)
pkill swayidle
;;
esac