dotfiles/.config/scripts/sway/set-primary-monitor

10 lines
229 B
Plaintext
Raw Permalink Normal View History

#!/bin/sh
# Get monitor offset using xrandr
2023-11-21 17:30:32 +08:00
monitor_offset="+1080"
display=$(xrandr --listactivemonitors | grep "$monitor_offset" | head -n1 | cut -d' ' -f6)
if [ -n "$display" ]; then
xrandr --output $display --primary
fi