Detect And Switch To External Monitor

#!/bin/bash
xrandr | grep "VGA-1 connected" > /dev/null
if [ $? -eq 0 ]; then
  xrandr --output VGA-1 --mode 1920x1080
  xrandr --output LVDS-1 --off
fi
tips/detect_and_switch_to_external_monitor.txt · Last modified: 2023-08-06 19:12 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki