init
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								beep-01a.mp3
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								beep-01a.mp3
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										14
									
								
								scan.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										14
									
								
								scan.sh
									
									
									
									
									
										Executable 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 | ||||
		Reference in New Issue
	
	Block a user