#!/bin/sh entries="Network settings\nBluetooth settings" if makoctl mode | grep -q "do-not-disturb"; then entries="$entries\nDisable do-not-disturb" else entries="$entries\nEnable do-not-disturb" fi if systemctl --user is-active --quiet wlsunset; then entries="$entries\nDisable night light" else entries="$entries\nEnable night light" fi if systemctl --user is-active --quiet swayidle; then entries="$entries\nDisable idle detection" else entries="$entries\nEnable idle detection" fi selected=$(echo -e $entries | fuzzel -d -w 24 -l 6) case "$selected" in "Disable do-not-disturb") makoctl mode -r do-not-disturb notify-send -c system -u low "Do-not-disturb is disabled" ;; "Enable do-not-disturb") makoctl mode -a do-not-disturb notify-send -c system -u low "Do-not-disturb is enabled" ;; "Network settings") networkmanager_dmenu;; "Bluetooth settings") dmenu-bluetooth;; "Disable night light") systemctl --user stop wlsunset;; "Enable night light") systemctl --user start wlsunset;; "Disable idle detection") systemctl --user stop swayidle;; "Enable idle detection") systemctl --user start swayidle;; esac