Skip to content

Commit

Permalink
Add right click launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
ojv committed May 30, 2017
1 parent a4ebcd4 commit bc36b0d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions widgets/pulseaudio.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ local conky = require("conky")
conky.config.pulseaudio = {
sink = 0, the sink to target
step = 10, volume percentage to increment/decrement
launch = "pavucontrol" util to launch on right click
slider = { configuration of the slider appearance, see:
forced_width = 50, awesomewm.org/apidoc/wibox.widget.slider.html
handle_width = 3,
Expand All @@ -29,6 +30,7 @@ local util = require("conky/util")
local settings = {
sink = 0,
step = 10,
launch = "pavucontrol",
slider = {},
}

Expand Down Expand Up @@ -132,6 +134,9 @@ return function(user_settings)
muted = not muted
updater("" .. slider.value, nil, iconbox)
end },
{ {}, 3, function()
awful.spawn(settings.launch)
end },
{ {}, 4, function(_, iconbox, _)
local new = slider.value + settings.step
if new > slider.maximum then
Expand Down

0 comments on commit bc36b0d

Please sign in to comment.