make getvol script nicer and work without amixer
This commit is contained in:
parent
27830a8c6d
commit
a470bb816f
1 changed files with 6 additions and 1 deletions
|
@ -1,2 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
amixer -D pulse sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%' | head -1
|
|
||||||
|
if command -v pactl &>/dev/null; then
|
||||||
|
pactl get-sink-volume $(pactl get-default-sink) | awk -F '[^0-9]+' '/left:/{print $3}'
|
||||||
|
else
|
||||||
|
amixer -D pulse sget Master | awk -F '[^0-9]+' '/Left:/{print $3}'
|
||||||
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue