Update 2024-02-14 07:51 OpenBSD/amd64-x13
This commit is contained in:
17
.bin/OLD/setvol
Executable file
17
.bin/OLD/setvol
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
increase() {
|
||||
_vol=$(echo "$(sndioctl -n output.level) + 0.05" | bc)
|
||||
sndioctl output.level=$_vol 2>&1 || sndioctl output.level=1
|
||||
|
||||
}
|
||||
decrease() {
|
||||
_vol=$(echo "$(sndioctl -n output.level) - 0.05" | bc)
|
||||
sndioctl output.level=$_vol || sndioctl output.level=0
|
||||
}
|
||||
|
||||
case $1 in
|
||||
"+") increase; ;;
|
||||
"-") decrease; ;;
|
||||
esac
|
||||
dunstify -r 1 "Volume: $(sndioctl -n output.level | tr -d '.' | cut -b1-3 | bc)%"
|
||||
Reference in New Issue
Block a user