Control Volume by mouse scroll.

This commit is contained in:
Kolan Sh 2015-02-13 21:55:39 +03:00
parent bd1ea492d2
commit e6733957eb
1 changed files with 12 additions and 0 deletions

12
wi.lua
View File

@ -70,7 +70,19 @@ baticon:buttons(batpct:buttons())
vicious.cache(vicious.widgets.volume)
volicon = wibox.widget.imagebox()
volicon:set_image(beautiful.widget_vol)
volicon:buttons(
awful.util.table.join(
awful.button({ }, 4, function () awful.util.spawn("amixer set Master 1%+") end),
awful.button({ }, 5, function () awful.util.spawn("amixer set Master 1%-") end)
)
)
volpct = wibox.widget.textbox()
volpct:buttons(
awful.util.table.join(
awful.button({ }, 4, function () awful.util.spawn("amixer set Master 1%+") end),
awful.button({ }, 5, function () awful.util.spawn("amixer set Master 1%-") end)
)
)
vicious.register(volpct, vicious.widgets.volume, "$1% ", nil, "Master")
----< CPU >-----------------------------------------------------------