diff options
-rwxr-xr-x | i3/bin/setbg-photo | 1 | ||||
-rwxr-xr-x | yoga/bin/dualmon | 7 | ||||
-rwxr-xr-x | yoga/bin/singlemon | 6 |
3 files changed, 9 insertions, 5 deletions
diff --git a/i3/bin/setbg-photo b/i3/bin/setbg-photo index 93d602b..88a980f 100755 --- a/i3/bin/setbg-photo +++ b/i3/bin/setbg-photo @@ -3,4 +3,3 @@ DIR="/home/camil/Dropbox/Photos/Wallpapers/active" feh --bg-fill "$DIR/$(ls -1 "$DIR" | sort -R | head -1)" -exit 1 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 diff --git a/yoga/bin/singlemon b/yoga/bin/singlemon index 600a4b9..af782a1 100755 --- a/yoga/bin/singlemon +++ b/yoga/bin/singlemon @@ -1,4 +1,6 @@ #!/bin/bash -xrandr --output eDP --primary --auto --output DisplayPort-1 --off +set -e +EXTERNAL="$(xrandr | grep 'DisplayPort.* connected' | cut -d' ' -f1)" +xrandr --output eDP --primary --auto --output $EXTERNAL --off setbg -xsetwacom set 'Wacom Intuos S Pen stylus' MapToOutput eDP 2>/dev/null +xsetwacom set 'Wacom Intuos S Pen stylus' MapToOutput eDP 2>/dev/null || true |