Skip to content

Instantly share code, notes, and snippets.

@rkjha
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rkjha/10342575 to your computer and use it in GitHub Desktop.
Save rkjha/10342575 to your computer and use it in GitHub Desktop.
Enable/disable 2nd monitor in ubuntu [using xrandr]. Add these lines to `~/.bash_alias.sh` (and update device name accordingly) and reload bash config. (`source ~/.bashrc`)
# bash alias for turning on/off 2nd monitor
alias 2m_off='xrandr --output HDMI-0 --off'
alias 2m_on='xrandr --output HDMI-0 --auto --right-of VGA-0'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment