Advertisement
zerinol

dual_monitor

Dec 21st, 2019
975
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.57 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # set up the two monitors for bspwm
  4. # NOTE This is a simplistic approach because I already know the settings I
  5. # want to apply.
  6. external_monitor=$(xrandr --query | grep 'HDMI1')
  7. if [[ ! $external_monitor = *disconnected* ]]; then
  8.     echo "Monitor conectado"
  9.     xrandr --output eDP1 --primary --mode 1366x768 --rotate normal --output HDMI1 --mode 1600x900 --rotate normal --above eDP1
  10.     bspc monitor HDMI1 -g 1600x900+0+0
  11. else
  12.     echo "Monitor desconectado"
  13.     xrandr --output eDP1 --primary --mode 1366x768 --rotate normal --output HDMI1 --off
  14. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement