2014-09-09 08:57:21 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
2017-03-08 06:37:05 +00:00
|
|
|
if [ "$#" -lt 1 ]; then
|
|
|
|
set -- "$@" above
|
2014-09-09 08:57:21 +00:00
|
|
|
fi
|
|
|
|
|
2018-04-03 07:49:00 +00:00
|
|
|
primary=$(xrandr | awk '/primary/ { print $1}')
|
2014-09-09 08:57:21 +00:00
|
|
|
|
|
|
|
# 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
|
2023-08-11 07:27:10 +00:00
|
|
|
|
|
|
|
# tune mouse to re-adjust mappings
|
|
|
|
tune-mouse
|