Various changes to desktop configuration
This commit is contained in:
@@ -49,9 +49,18 @@ input type:keyboard {
|
||||
xkb_layout "us"
|
||||
}
|
||||
|
||||
output HDMI-A-1 resolution 2560x1440 pos 0 0
|
||||
output HDMI-A-2 resolution 1920x1080 pos -1920 0
|
||||
|
||||
workspace 1 output HDMI-A-1
|
||||
workspace 4 output HDMI-A-2
|
||||
|
||||
|
||||
workspace_auto_back_and_forth yes
|
||||
bindsym $mod+Tab workspace back_and_forth
|
||||
|
||||
bindsym $mod+Shift+m exec ~/.config/sway/toggle-hdmi.sh
|
||||
|
||||
### Key bindings
|
||||
bindsym $mod+Return exec $term
|
||||
bindsym $mod+q kill
|
||||
@@ -112,3 +121,5 @@ bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
|
||||
bindsym Print exec grim -g "$(slurp)" - | wl-copy
|
||||
bindsym $mod+Print exec grim - | wl-copy
|
||||
|
||||
|
||||
exec_always dbus-update-activation-environment --systemd WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP=sway
|
||||
|
||||
17
machines/desktop/config/sway/toggle-hdmi.sh
Executable file
17
machines/desktop/config/sway/toggle-hdmi.sh
Executable 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
|
||||
|
||||
Reference in New Issue
Block a user