diff --git a/.config/scripts/sway/set-correct-monitor b/.config/scripts/sway/set-correct-monitor new file mode 100755 index 0000000..6ecfbe1 --- /dev/null +++ b/.config/scripts/sway/set-correct-monitor @@ -0,0 +1,8 @@ +#!/bin/sh + +display=$(xrandr --listactivemonitors | grep "$1" | head -n1 | cut -d' ' -f6) + +if [ -n "$display" ]; then + xrandr --output $display --primary +fi +