2

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.

keyboard shortcuts

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. volume change indicator

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?

1
  • I'm sure is somewhere in dbus. I need to check.
    – Braiam
    Dec 4, 2013 at 1:39

2 Answers 2

1

The sound notification you can disable it in the Sound preferences:

enter image description here

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:

amixer set Master 10%+ ## Increase the volume by 10%
amixer set Master 10%- ## Decrease the volume by 10%
amixer set Master toggle ## Sets mute on and off

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:

 pactl set-source-mute 0 toggle
 pactl set-source-volume 0 +10
 pactl set-source-volume 0 -10

"This should work" for most of cases.

3
  • Currently if I press Shift + Audio raise volume nothing happens. I don't need to disable anything. I need to add new binding that adjusts volume without sound notification. Aug 12, 2013 at 22:53
  • Check again, you should create personalized shortcuts for doing so.
    – Braiam
    Aug 12, 2013 at 23:15
  • amixer is close, but it doesn't show the visual volume change indicator. pactl didn't work for me. I've added info to the question. Aug 13, 2013 at 0:09
1

On Ubuntu 15.10 you can just press Alt + VolumeUp and Alt + VolumeDown to change the volume with an overlay notification without playing a sound notification.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .