Use correct xinput flag and fix quoting issue
This commit is contained in:
parent
5a43d3eba2
commit
cbdaf1bfbd
|
@ -2,9 +2,9 @@
|
|||
|
||||
maptouchscreen() {
|
||||
# maptouchscreen <name> <output>
|
||||
# <name> should be a full name from the output of `xinput list`
|
||||
# <output> should be an xrandr output name
|
||||
xinput --map-to-output $(xinput list --idonly "$1") $2
|
||||
local name="$1" # <name> should be a full name from the output of `xinput list`
|
||||
local output="$2" # <output> 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
|
||||
|
||||
|
|
Loading…
Reference in New Issue