diff options
Diffstat (limited to 'yoga/bin/dualmon')
-rwxr-xr-x | yoga/bin/dualmon | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/yoga/bin/dualmon b/yoga/bin/dualmon index 3aa66ab..ddb6485 100755 --- a/yoga/bin/dualmon +++ b/yoga/bin/dualmon @@ -1,4 +1,7 @@ #!/bin/bash -xrandr --output eDP --below DisplayPort-1 --primary --output DisplayPort-1 --auto +set -e +EXTERNAL="$(xrandr | grep 'DisplayPort.* connected' | cut -d' ' -f1)" +[ -z "$EXTERNAL" ] && exit 1 +xrandr --output eDP --auto --below $EXTERNAL --primary --output $EXTERNAL --auto setbg -xsetwacom set 'Wacom Intuos S Pen stylus' MapToOutput DisplayPort-1 2>/dev/null +xsetwacom set 'Wacom Intuos S Pen stylus' MapToOutput $EXTERNAL 2>/dev/null || true |