2023-11-27 19:26:54 -08:00
|
|
|
#!/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)
|
2023-11-27 19:48:54 -08:00
|
|
|
swayidle -w &
|
2023-11-27 19:26:54 -08:00
|
|
|
;;
|
|
|
|
1)
|
|
|
|
pkill swayidle
|
|
|
|
;;
|
|
|
|
esac
|