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

9 lines
160 B
Bash
Executable File

#!/bin/sh
display=$(xrandr --listactivemonitors | grep "$1" | head -n1 | cut -d' ' -f6)
if [ -n "$display" ]; then
xrandr --output $display --primary
fi