dotfiles

Settings and scripts
git clone git://git.konyahin.xyz/dotfiles
Log | Files | Refs | Submodules | LICENSE

switchscreen (240B)


      1 #!/usr/bin/env sh
      2 
      3 set -e
      4 
      5 CUR_SCREEN=$(xrandr --listactivemonitors | tail -1 | awk '{print $NF}')
      6 
      7 if [ "$CUR_SCREEN" = "VGA-1" ]; then
      8     SCREEN=LVDS-1
      9 else
     10 	SCREEN=VGA-1
     11 fi
     12 
     13 xrandr --output "$SCREEN" --auto --output "$CUR_SCREEN" --off