When I change volume using the media keys there is a popping sound notification.
Sometimes I'm playing media, and I want to adjust the volume without sound notification.
I want to add Volume up, muted
-> Shift + Audio raise volume
shortcut.
How do I do it?
Binding Shift + Audio raise volume
to amixer set Master 10%+
changes the volume, but doesn't display the visual indicator of volume change.
Looking at dbus-monitor
shows different events:
Stock Volume up
:
method call sender=:1.4 -> dest=:1.25 serial=2167 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=GetCapabilities
method return sender=:1.25 -> dest=:1.4 reply_serial=2167
array [
string "body"
string "body-markup"
string "icon-static"
string "image/svg+xml"
string "x-canonical-private-synchronous"
string "x-canonical-append"
string "x-canonical-private-icon-only"
string "x-canonical-truncation"
string "private-synchronous"
string "append"
string "private-icon-only"
string "truncation"
]
method call sender=:1.4 -> dest=:1.25 serial=2168 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify
string "gnome-settings-daemon"
uint32 0
string "notification-audio-volume-medium"
string " "
string ""
array [
]
array [
dict entry(
string "x-canonical-private-synchronous"
variant string "volume"
)
dict entry(
string "value"
variant int32 61
)
]
int32 -1
method return sender=:1.25 -> dest=:1.4 reply_serial=2168
uint32 0
signal sender=:1.49 -> dest=(null destination) serial=1119 path=/com/canonical/indicator/sound/menu; interface=com.canonical.dbusmenu; member=ItemsPropertiesUpdated
array [
struct {
int32 3
array [
dict entry(
string "x-canonical-ido-volume-level"
variant double 61.5646
)
]
}
]
array [
]
Then amixer set Master 10%+
:
signal sender=:1.49 -> dest=(null destination) serial=1116 path=/com/canonical/indicator/sound/menu; interface=com.canonical.dbusmenu; member=ItemsPropertiesUpdated
array [
struct {
int32 3
array [
dict entry(
string "x-canonical-ido-volume-level"
variant double 73.5641
)
]
}
]
array [
]
It seems that Volume up
also runs some command that checks capabilities and shows a volume indicator. Where can I call this command directly?
The sound notification you can disable it in the Sound preferences:
There isn't still an easy way to disable certain sound events. But you can use direct commands to the alsa server to do this:
Then you can create the shortcut hitting the + sign in the keyboard configuration. For people wondering why I didn't used pulseaudio, was because I don't use pulseaudio.
Pulseaudio requires more work, like:
"This should work" for most of cases.
On Ubuntu 15.10 you can just press
Alt + VolumeUp
andAlt + VolumeDown
to change the volume with an overlay notification without playing a sound notification.