May 15, 2010 · General ·

Sponsored Link
If you're a music fan like me, you're listening to music almost all the time whilst browsing the web/working/studying. Often an interuption requires you to quickly lower the volume or mute the music so that you can, for example listen to what a colleague has to say.

By default you have two options:

  1. Move your mouse over the volume control applet and scroll
  2. Hit whatever keyboard combination you have set to do the task

The reason I don't like these two options are that they require me to look at  the screen/keyboard, instead of looking at whoever's talking to me, and when my laptop is closed (While I'm "studying") I have to first open the lid to do this.

In old Ubuntu you had a third option, move the volume control applet to one of the corners. Then you could simply move your mouse to that corner with a flick of the wrist, and scroll to change the volume.

In lucid however the new Indicator Applet system prevents you from customizing the location of the particular applets. As such I use CompizConfig Settings Manager to achieve the same result.

First install it:

sudo apt-get install compizconfig-settings-manager

From its main menu, select the Commands option

Set the first two commanad lines to:

amixer -c 0 sset PCM,0 20+
amixer -c 0 sset PCM,0 20-

Then you can set the corresponding button bindings, selecting whichever corner is comfortable for you, along with Mouse Button4 (Scroll up) for the first command and Button5 (Scroll down) for the second.

You should now be able to quickly change volume without looking. Note you may want to play around with different values, and also different channels. For example changing the command to "amixer -c 0 sset Master,0 5-" changes the Master channel by 5 (out of 255).

You could also customize other buttons in other corners to do other commands,  but I leave it to you to explore the near infinite possibilities.

Sponsored Link

6 Comments to “Quickly change volume in Ubuntu 10.04 (Lucid Lynx)”

  1. Sagar says:

    Nice Post

  2. Ralph says:

    Very nice feature. Many thanks!

  3. gotbletu says:

    Thanks i also like to add to toggle mute on and off

    “amixer sset Master toggle”

    I set this to middle click

  4. chris says:

    I’m using this much simpler configuration, which assumes that you only have one sound card, but I think that’s true for most people.

    button4: amixer sset Master 2+
    button5: amixer sset Master 2-
    button2: amixer sset Master toggle

  5. S00000 says:

    “infinite possibilities”
    Anyone know if it’s possible to have more than 12 commands in Compiz->Commands ??

    I have been searching for so long, now :((

  6. x says:

    Great!

Leave a Reply

  • Recent comments