diff --git a/.config/srandrd.conf b/.config/srandrd.conf index 33b7784..79d2701 100755 --- a/.config/srandrd.conf +++ b/.config/srandrd.conf @@ -2,9 +2,9 @@ maptouchscreen() { # maptouchscreen - # should be a full name from the output of `xinput list` - # should be an xrandr output name - xinput --map-to-output $(xinput list --idonly "$1") $2 + local name="$1" # should be a full name from the output of `xinput list` + local output="$2" # should be an xrandr output name + xinput --map-to-output $(xinput list --id-only "$name") "$output" } setpasink() { @@ -21,12 +21,12 @@ case "$(hostname)" in case "$SRANDRD_ACTION" in "$hdmi connected") xrandr --output $hdmi --auto --right-of $mainoutput - maptouchscreen $tsid $mainoutput + maptouchscreen "$tsid" "$mainoutput" setpasink hdmi ;; "$hdmi disconnected") xrandr --output $hdmi --off --output $mainoutput --auto - maptouchscreen $tsid $mainoutput + maptouchscreen "$tsid" "$mainoutput" setpasink analog ;; esac @@ -38,7 +38,7 @@ case "$(hostname)" in hdmi="HDMI1" xrandr --output $mainoutput --auto --output $hdmi --right-of $mainoutput - maptouchscreen $tsid $mainoutput + maptouchscreen "$tsid" "$mainoutput" ;; esac