1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2024-12-22 11:12:31 +00:00

Add usage for buttons 4/5 (mouse scroll) to the volume widget.

This commit is contained in:
Jeferson Siqueira 2019-11-09 21:41:50 +00:00 committed by Luca CPZ
parent 0d60af1161
commit 99988d7c1f
2 changed files with 11 additions and 1 deletions

View file

@ -90,7 +90,7 @@ local chosen_theme = themes[5]
local modkey = "Mod4" local modkey = "Mod4"
local altkey = "Mod1" local altkey = "Mod1"
local terminal = "urxvtc" local terminal = "urxvtc"
local vi_focus = true -- vi-like client focus - https://github.com/lcpz/awesome-copycats/issues/275 local vi_focus = false -- vi-like client focus - https://github.com/lcpz/awesome-copycats/issues/275
local editor = os.getenv("EDITOR") or "vim" local editor = os.getenv("EDITOR") or "vim"
local gui_editor = os.getenv("GUI_EDITOR") or "gvim" local gui_editor = os.getenv("GUI_EDITOR") or "gvim"
local browser = os.getenv("BROWSER") or "firefox" local browser = os.getenv("BROWSER") or "firefox"

View file

@ -241,6 +241,16 @@ theme.volume = lain.widget.alsa({
widget:set_markup(markup.font(theme.font, " " .. volume_now.level .. "% ")) widget:set_markup(markup.font(theme.font, " " .. volume_now.level .. "% "))
end end
}) })
theme.volume.widget:buttons(awful.util.table.join(
awful.button({}, 4, function ()
awful.util.spawn("amixer set Master 1%+")
theme.volume.update()
end),
awful.button({}, 5, function ()
awful.util.spawn("amixer set Master 1%-")
theme.volume.update()
end)
))
-- Net -- Net
local neticon = wibox.widget.imagebox(theme.widget_net) local neticon = wibox.widget.imagebox(theme.widget_net)