monitors.sh (544B)
1 #!/bin/sh 2 3 VGA1=$(xrandr | awk '/VGA-1/ { print $2 }') 4 if [ "$VGA1" = "connected" ]; then 5 # run xrander script for docked screen; configured with arandr 6 xrandr \ 7 --output LVDS-1 --off \ 8 --output VGA-1 --mode 1920x1080 --pos 0x420 --rotate normal \ 9 --output DP-2 --primary --mode 1920x1080 --pos 1920x0 --rotate left; 10 else 11 # Run xrander for built in screen only 12 xrandr --output LVDS-1 --mode 1366x768 --pos 0x0 --rotate normal; 13 fi 14 15 # Set desktop background image: 16 feh --bg-fill "$HOME"/pictures/backgrounds/StarryPointers.png 17 18 exit 0;