12

Simple question but hard answer, i searched around in Google a solution to make a dynamic widget to control and see the volume with Awesome Window manager but i can't find a working solution.

Any one got a solution to this ?

x_vi_r
  • 283
  • 1
  • 2
  • 7

4 Answers4

7

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.

Codebling
  • 239
  • 1
  • 3
  • 10
jumpwah
  • 86
  • 2
  • Works great except the mute function, it mutes my sound but another click don't unmute it ... – x_vi_r Oct 17 '13 at 20:16
  • Same, but it's a bug with amixer I think; https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/878986. For me the command `amixer sset Master toggle` or `amixer -d pulse set Master 1+ togglemute` both work to toggle mute. – jumpwah Oct 17 '13 at 21:53
  • 1
    So to get the click to work, insert your working command in the line starting with io.popen (in the else statement, in the volume function). For example, my line for that is `io.popen("amixer -D pulse set Master 1+ togglemute"):read("*all")` (Mistake in the previous comment which I cannot edit anymore: should be `amixer -D` not `amixer -d`). – jumpwah Oct 17 '13 at 21:59
6

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:

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

streetturtle
  • 181
  • 1
  • 6
4

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

Arjun Gopkumar
  • 111
  • 1
  • 7
1

volumeicon worked out of the box for me. Note that this is not an AwesomeWM widget but a standalone project written in C. The advantage of this over the Awesome widgets are:

  • can use mouse to interact with widget and adjust volume (scroll wheel or dragging volume bar)
  • works out of the box with PulseAudio and multiple output sinks
  • configurable notifications when volume is adjusted (GTK+-style or FreeDesktop-style notifications, or none at all)
  • opens a mixer of your choice on middle click

If you'd prefer a pure Lua Awesome widget, here is a list of available ones:

Codebling
  • 239
  • 1
  • 3
  • 10