Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
howtos:window_managers:dual_monitors [2016/01/12 03:30 (UTC)]
arfon [Cool Switching Script]
howtos:window_managers:dual_monitors [2016/01/12 03:31 (UTC)]
arfon [Cool Switching Scripts]
Line 60: Line 60:
 <​code>​ <​code>​
 #!/bin/bash #!/bin/bash
-vPRIMARYMONITOR="​DVI-I-3" # <--- CHANGE THIS.  Find using "​xrandr -q"+vPRIMARYMONITOR="​DVI-I-0" # <--- CHANGE THIS.  Find using "​xrandr -q"
 vLOC="​--right"​ # <--- Change this if you want the second monitor in another position. CHOICES: --above ​ --below ​ --left ​ --right vLOC="​--right"​ # <--- Change this if you want the second monitor in another position. CHOICES: --above ​ --below ​ --left ​ --right
 vEXT=$(xrandr -q | grep " connected"​ | grep -v $vPRIMARYMONITOR | awk '​{print $1}' | head -n 1 ) vEXT=$(xrandr -q | grep " connected"​ | grep -v $vPRIMARYMONITOR | awk '​{print $1}' | head -n 1 )
Line 76: Line 76:
 <​code>​ <​code>​
 #!/bin/bash #!/bin/bash
-vPRIMARYMONITOR="​DVI-I-3" # <--- CHANGE THIS.  Find using "​xrandr -q"+vPRIMARYMONITOR="​DVI-I-0" # <--- CHANGE THIS.  Find using "​xrandr -q"
 vEXT=$(xrandr -q | grep " connected"​ | grep -v $vPRIMARYMONITOR | awk '​{print $1}' | head -n 1 ) vEXT=$(xrandr -q | grep " connected"​ | grep -v $vPRIMARYMONITOR | awk '​{print $1}' | head -n 1 )
 vOnOff=$(xrandr -q | grep $vEXT | sed '​s/​primary//​g'​ | awk '​{print $3}'| sed '​s/​[0-9]*x[0-9]*+[0-9]*+[0-9]*/​ON/​g'​ ) vOnOff=$(xrandr -q | grep $vEXT | sed '​s/​primary//​g'​ | awk '​{print $3}'| sed '​s/​[0-9]*x[0-9]*+[0-9]*+[0-9]*/​ON/​g'​ )

In Other Languages
QR Code
QR Code howtos:window_managers:dual_monitors (generated for current page)