proper wayland support
This commit is contained in:
parent
b3a36a9f3c
commit
1fbab72252
12
scan.sh
12
scan.sh
@ -9,7 +9,15 @@ zbarcam --nodisplay $1 | while read line; do
|
||||
if [[ $line == *:* ]]; then
|
||||
code="${line#*:}"
|
||||
echo "$code"
|
||||
wtype "$code" & xdotool type --delay 0 "$code" & mpv --quiet --no-video beep.mp3 >> /dev/null
|
||||
wtype $'\n' & xdotool key Return
|
||||
|
||||
if ls /run/user/$(id -u)/wayland-*.lock > /dev/null 2>&1
|
||||
then
|
||||
wtype "$code" & mpv --quiet --no-video beep.mp3 >> /dev/null
|
||||
wtype $'\n'
|
||||
else
|
||||
xdotool type --delay 0 "$code" & mpv --quiet --no-video beep.mp3 >> /dev/null
|
||||
xdotool key Return
|
||||
fi
|
||||
|
||||
fi
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user