#!/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 -w & ;; 1) pkill swayidle ;; esac