Add tv-power-menu.sh

This commit is contained in:
Alexander Rosenberg 2023-12-20 20:21:40 -08:00
parent 9388509fe9
commit f1d995d119
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730
2 changed files with 19 additions and 0 deletions

View File

@ -5,6 +5,7 @@ pgrep swayidle && swayidle_state="Enabled" || swayidle_state="Disabled"
# Format: label action condition
local entries=('Select system sound output' 'select-sound-output.sh' 'true'
"Enable or disable system sleep (Current: ${swayidle_state})" 'system-sleep-menu.sh' 'true'
'Enable or disable TV' 'tv-power-menu.sh' '[[ "${HOST}" = "alexanders-desktop" ]]'
'Configure USB device access' 'usbguard-menu.py' 'pgrep usbguard-daemon'
'Power settings (restart and shutdown)' 'system-power-menu.sh' 'true')

18
system-menu/tv-power-menu.sh Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env zsh
choice="$(fuzzel --index -d <<'EOF'
Enable
Disable
EOF
)"
if (( ${?} != 0 )) || (( "${choice}" == -1 )); then
exit 0
fi
case "${choice}" in
0)
hyprctl keyword monitor 'DP-1,1920x1080@60,auto,1'
;;
1)
hyprctl keyword monitor 'DP-1,disable'
;;
esac