~yerinalexey/dotfiles

ref: 144a38b0aa0a39003633d53b77fe4e3ca29c054b dotfiles/scripts/update-volume -rwxr-xr-x 354 bytes
144a38b0Alexey Yerin river,update-volume: fix old wob crashes 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

# Update ALSA volume
# Usage: update-volume up
#        update-volume down

case "$1" in
	up) amixer set Master 5%+ ;;
	down) amixer set Master 5%- ;;
	*)
		printf "Unknown argument: %s\n" "$1"
		exit 1
	;;
esac

newvol="$(amixer sget Master | grep "Mono:" | awk -F"[][]" '{ print $2 }' | sed 's/%$//')"
printf "%s\n" "$newvol" >> /tmp/wob-in