multi display script

This commit is contained in:
2018-10-26 09:55:10 -06:00
parent a5d97835b6
commit 9e1089e6a3
Executable
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
status=$(cat /sys/class/drm/card0-HDMI-A-1/status)
if [ $status = 'connected' ]; then
xrandr --output eDP-1 --auto --output HDMI-1 --auto --scale 2x2 --right-of eDP-1
twmnc -t 'display' -c 'HDMI plugged'
else
xrandr --output HDMI-1 --off
twmnc -t 'display' -c 'HDMI unplugged'
fi