You are not logged in.
Both pulseaudio-ctl and pavolume are very slow for me, there's a huge delay that starts to build up when I'm raising or lowering the volume that ends up with the volume still going up/down several seconds after I stopped pressing the keys. Besides that, both of them send a new notifications for each time I press the key, clogging up my desktop instead of a single one that gets updated with each keypress.
pnmixer works fine, but since it's not supposed to be compatible with pulse, there are some limitations, such as being unable to raise the volume above 100% and unmuting does not work.
So, how do you guys have it set up? I couldn't find any other ways besides using pactl, but that doesn't send any notifications at all as far as I know.
Thanks for any info on this
Last edited by ralph_13 (2017-07-20 03:51:41)
Offline
pnmixer works fine, but since it's not supposed to be compatible with pulse, there are some limitations, such as being unable to raise the volume above 100% and unmuting does not work.
I guess you mean pamixer, I don't know any pnmixer. pamixer supports mute/unmute. Volume is limited to 100%, which is acutally good for me, as my little speakers don't work well with high volumes.
So, how do you guys have it set up? I couldn't find any other ways besides using pactl, but that doesn't send any notifications at all as far as I know.
Here is my keybinding for mute/unmute key
bindcode 121 exec /home/sharad/bin/mute && notify-send "Mute: $(pamixer --get-mute)"
Here is /home/sharad/bin/mute script
#!/bin/bash
sinks=$(pamixer --list-sink | grep ^[0-9] | awk '{print $1}' | xargs)
for x in $sinks; do
pamixer --sink $x -t ;
done
There are similar scripts for volumeup & down keys, and all have notification support.
Arch is home!
https://github.com/Docbroke
Offline
If you do not want to work with custom scripts, I suggest volumeicon; allows for customization of keys, notification type and other mixer settings.
Offline
If you do not want to work with custom scripts, I suggest volumeicon; allows for customization of keys, notification type and other mixer settings.
Volumeicon worked for me, but it didn't support volume boosting.
I guess you mean pamixer, I don't know any pnmixer
I actually did mean pnmixer, I wasn't aware about pamixer. Ended up using xbindkeys to:
#volume up
"pamixer -i 5 --allow-boost && notify-send "volume: $(pamixer --get-volume)%""
XF86AudioRaiseVolume
#volume down
"pamixer -d 5 --allow-boost && notify-send "volume: $(pamixer --get-volume)%""
XF86AudioLowerVolume
#mute
"pamixer -t && notify-send "mute: $(pamixer --get-mute)""
XF86AudioMute
Works like a charm, thanks for the tips
Last edited by ralph_13 (2017-07-20 03:46:00)
Offline
here's my volume control script. I call it with: <script> up; <script> down; <script> mute; <script> list; and <script> <percentage>. just set your media keys to those and away you go.
#!/bin/bash
sinkName=$(pacmd info | grep 'Default sink' | awk '{print $4}')
sinkNumber=$(pacmd info | grep "sink:.*$sinkName" | awk '{print $2}')
getVolume() {
volumeInput=$(pactl list sinks)
currentVolume=$(echo "${volumeInput#*Sink #$sinkNumber}" | grep -E 'V.*-left' | grep -oE '[0-9]+%' | tail -n 1)
notify-send "Volume: $currentVolume"
echo Volume: "$currentVolume"
}
case "$1" in
up) pactl set-sink-volume @DEFAULT_SINK@ +5%; getVolume;;
down) pactl set-sink-volume @DEFAULT_SINK@ -5%; getVolume;;
mute) muted=$(pactl list sinks | grep 'Mute: yes')
if [ -z "$muted" ]; then
pactl set-sink-mute @DEFAULT_SINK@ 1
notify-send Volume: Muted
echo Volume: Muted
else
pactl set-sink-mute @DEFAULT_SINK@ 0
getVolume
fi;;
list) getVolume;;
esac
if [[ "$1" =~ [0-9]+ ]]; then
pactl set-sink-volume @DEFAULT_SINK@ "$1%"; getVolume
fi
Offline
For future reference, I swapped notify-send for dunstify to set up an id so dunst updates it instead of sending multiple notifications.
Offline
I wasn't aware of dunstify, thanks for sharing.
Arch is home!
https://github.com/Docbroke
Offline