19 lines
338 B
Bash
Executable file
19 lines
338 B
Bash
Executable file
#!/bin/sh
|
|
|
|
|
|
if [ "$#" -lt 1 ]; then
|
|
set -- "$@" above
|
|
fi
|
|
|
|
primary=eDP-1
|
|
|
|
# position: something xrandr understands
|
|
position=$1; shift
|
|
|
|
# Turn all off
|
|
for dp in $(xrandr | awk '/connected/ { print $1 }'); do
|
|
# Skip primary display
|
|
[ "$dp" = "$primary" ] && continue
|
|
|
|
xrandr --output "$dp" --auto --$position "$primary"
|
|
done
|