This commit is contained in:
Shihaam Abdul Rahman 2024-01-07 01:33:24 +05:00
parent 44f05178b7
commit 0d62ca92a8
Signed by: shihaam
GPG Key ID: 6DA2E87EBC227636
2 changed files with 14 additions and 0 deletions

BIN
beep-01a.mp3 Normal file

Binary file not shown.

14
scan.sh Executable file
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