i3-config/scripts/i3display.sh
2019-04-17 16:37:04 -05:00

13 lines
334 B
Bash

#!/bin/bash
IN="LVDS1"
EXT="VGA1"
if ( xrandr | grep -q "$EXT disconnected")
then
xrandr --output $IN --auto --output $EXT --off
else
xrandr --output $IN --auto --primary --output $EXT --auto --right-of $IN
## Only VGA
# xrandr --output $IN --mode 1366x768
# xrandr --output $EXT --mode 1366x768 --right-of $IN
fi