]> Sergey Matveev's repositories - dotfiles.git/commitdiff
xrandr scripts aware of two possible outputs
authorSergey Matveev <stargrave@stargrave.org>
Sun, 20 Sep 2020 09:13:15 +0000 (12:13 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sun, 20 Sep 2020 09:13:15 +0000 (12:13 +0300)
bin/bin/xr-external
bin/bin/xr-internal

index 0ecdfc2bf18dfccbf516e0e44cdd9a7826072236..3c5560fdbb5088c022cced754fe2d8b3db3cc2ea 100755 (executable)
@@ -1,3 +1,4 @@
 #!/bin/sh
 
-xrandr --output HDMI-1 --auto --output eDP-1 --off
+out=`xrandr --query | grep " connected" | sed /eDP/d | cut -d\  -f 1`
+xrandr --output eDP-1 --off --output $out --auto
index 9d7b9c2db394d03a3ce60e23260d0724e6ef0d30..4ab5f88ee5638ba1fff70e6dcc29fac847077839 100755 (executable)
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-xrandr --output eDP-1 --auto --output HDMI-1 --off
+xrandr --output DP-1 --off --output HDMI-1 --off --output eDP-1 --auto