This commit is contained in:
2024-01-07 01:33:24 +05:00
parent 44f05178b7
commit 0d62ca92a8
2 changed files with 14 additions and 0 deletions
BIN
View File
Binary file not shown.
Executable
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
# Debian: sudo apt-get install zbar-tools xdotool mpv
# Arch: sudo pacman -S zbar xdotool mpv
zbarcam /dev/video0 | while read line; do
if [[ $line == *:* ]]; then
code="${line#*:}"
echo "$code"
mpv --quiet --no-video beep-01a.mp3 >> /dev/null
xdotool type --delay 0 "$code"
xdotool key Return
fi
done