diff options
| author | Marc Vertes <mvertes@free.fr> | 2020-04-29 12:35:49 +0200 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2020-04-29 12:35:49 +0200 |
| commit | 60fcbaef26d676847ad1bb525c1c146434b7bdf7 (patch) | |
| tree | 2de4c2500c98a77be6d09cfdfe76a58c53c51ae4 /bin/hdmi | |
| parent | 6f90dc904c1cff1f82c2f8dbc8fd2b24f5fc9ef6 (diff) | |
feature: add hdmi automatic toggle
Diffstat (limited to 'bin/hdmi')
| -rwxr-xr-x | bin/hdmi | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/hdmi b/bin/hdmi new file mode 100755 index 0000000..f5f7b1f --- /dev/null +++ b/bin/hdmi @@ -0,0 +1,10 @@ +#!/bin/sh + +# Toggle auxiliary HDMI screen on/off when connected/disconnected. +opt="--auto --right-of eDP-1" + +# Also add the following rule to /etc/udev/rules.d/hdmi.rules +# KERNEL=="card0", SUBSYSTEM=="drm", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/marc/.Xauthority", RUN+="/home/marc/bin/hdmi" + +xrandr | grep -q 'HDMI-1 connected' || opt="--off" +xrandr --output HDMI-1 $opt |
