Update tv-power-menu.sh
This commit is contained in:
@ -1,6 +1,9 @@
|
|||||||
#!/usr/bin/env zsh
|
#!/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
|
Enable
|
||||||
Disable
|
Disable
|
||||||
EOF
|
EOF
|
||||||
@ -10,9 +13,9 @@ if (( ${?} != 0 )) || (( "${choice}" == -1 )); then
|
|||||||
fi
|
fi
|
||||||
case "${choice}" in
|
case "${choice}" in
|
||||||
0)
|
0)
|
||||||
wlr-randr --output DP-3 --mode 1920x1080@60 --scale 1 --on
|
kanshictl switch tv
|
||||||
;;
|
;;
|
||||||
1)
|
1)
|
||||||
wlr-randr --output DP-3 --off
|
kanshictl switch no-tv
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Reference in New Issue
Block a user