z_mirror/dotfiles
git clone https://git.raiguard.me/z_mirror/dotfiles
a6a7bc3
uraya-alpine
1#!/bin/sh 2 3entries="Network settings\nBluetooth settings" 4 5if makoctl mode | grep -q "do-not-disturb"; then 6 entries="$entries\nDisable do-not-disturb" 7else 8 entries="$entries\nEnable do-not-disturb" 9fi 10 11if systemctl --user is-active --quiet wlsunset; then 12 entries="$entries\nDisable night light" 13else 14 entries="$entries\nEnable night light" 15fi 16 17if systemctl --user is-active --quiet swayidle; then 18 entries="$entries\nDisable idle detection" 19else 20 entries="$entries\nEnable idle detection" 21fi 22 23selected=$(echo -e $entries | fuzzel -d -w 24 -l 6) 24 25case "$selected" in 26 "Disable do-not-disturb") 27 makoctl mode -r do-not-disturb 28 notify-send -c system -u low "Do-not-disturb is disabled" 29 ;; 30 "Enable do-not-disturb") 31 makoctl mode -a do-not-disturb 32 notify-send -c system -u low "Do-not-disturb is enabled" 33 ;; 34 "Network settings") 35 networkmanager_dmenu;; 36 "Bluetooth settings") 37 dmenu-bluetooth;; 38 "Disable night light") 39 systemctl --user stop wlsunset;; 40 "Enable night light") 41 systemctl --user start wlsunset;; 42 "Disable idle detection") 43 systemctl --user stop swayidle;; 44 "Enable idle detection") 45 systemctl --user start swayidle;; 46esac