Various changes to desktop configuration

This commit is contained in:
2026-02-22 08:50:34 +08:00
parent 740297097b
commit aeffcee52f
9 changed files with 1972 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
#!/bin/sh
set -eu
OUTPUT="HDMI-A-2"
active="$(swaymsg -t get_outputs -r \
| jq -r --arg o "$OUTPUT" '.[] | select(.name==$o) | .active')"
case "$active" in
true) swaymsg output "$OUTPUT" disable ;;
false) swaymsg output "$OUTPUT" enable ;;
*)
printf 'Output %s not found or jq parse error\n' "$OUTPUT" >&2
exit 1
;;
esac