How to have a volume control/widget in Awesome WM?

Solution 1:

I simply followed the tutorial at http://awesome.naquadah.org/wiki/Volume_control_and_display and it worked. However, volume control was only via keyboard. Is this what you were looking for?

I should note that I'm on debian (testing) which I think uses awesome 3.4.

-- Update: After some testing out, I found http://awesome.naquadah.org/wiki/Farhavens_volume_widget, which has mouse controls (scroll mouse to control volume, and click to toggle mute). Following the tutorial works on my box.

Solution 2:

I'd like to mention following implementations just in case somebody is interested to have a volume control widget compatible with Awesome WM 4+:

screenshot

From left to right:

  • volume widget
  • volumebar-widget
  • volumearc-widget

All three widgets support mouse control: scroll up/down - increases/decreases volume, click - toggles mute.

Solution 3:

If you have media keys you can use this

awful.key({}, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer -D pulse sset Master 2%+", false) end),
awful.key({}, "XF86AudioLowerVolume", function () awful.util.spawn("amixer -D pulse sset Master 2%-", false) end),
awful.key({}, "XF86AudioMute", function () awful.util.spawn("amixer -D pulse sset Master toggle", false) end),

in globalkeys in your rc.lua script