Add system-sleep-menu.sh
This commit is contained in:
20
system-menu/system-sleep-menu.sh
Executable file
20
system-menu/system-sleep-menu.sh
Executable 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
|
Reference in New Issue
Block a user