Update tv-power-menu.sh
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
choice="$(fuzzel --index -d <<'EOF'
|
||||
# Remember: for the shell's if, 0 is true and anything else is false!
|
||||
current="$(wlr-randr --json | jq --raw-output 'if .[] | select(.name == "HDMI-A-1").enabled then "Enabled" else "Disabled" end')"
|
||||
|
||||
choice="$(fuzzel --index -p "Cur: ${current} > " -d <<'EOF'
|
||||
Enable
|
||||
Disable
|
||||
EOF
|
||||
@ -10,9 +13,9 @@ if (( ${?} != 0 )) || (( "${choice}" == -1 )); then
|
||||
fi
|
||||
case "${choice}" in
|
||||
0)
|
||||
wlr-randr --output DP-3 --mode 1920x1080@60 --scale 1 --on
|
||||
kanshictl switch tv
|
||||
;;
|
||||
1)
|
||||
wlr-randr --output DP-3 --off
|
||||
kanshictl switch no-tv
|
||||
;;
|
||||
esac
|
||||
|
Reference in New Issue
Block a user