My dotfiles for my Linux rice managed with stow and make
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

lightdmscreen.sh 582B

12345678910111213141516
  1. #!/bin/bash
  2. left='HDMI-3'
  3. right='HDMI-2'
  4. laptop='LVDS-1'
  5. if [[ ($(xrandr -q | grep $left\ con)) && ($(xrandr -q | grep $right\ con)) ]]; then
  6. xrandr --output $left --auto --output $right --auto --right-of $left --output $laptop --off
  7. elif [[ $(xrandr -q | grep $left\ con) ]]; then
  8. xrandr --output $left --auto --output $laptop --off --output $right --off
  9. elif [[ $(xrandr -q | grep $right\ con) ]]; then
  10. xrandr --output $right --auto --output $laptop --off --output $left --off
  11. else
  12. xrandr --output $laptop --auto --output $left --off --output $right --off
  13. fi
  14. exit 0;