From 99988d7c1f6ca31562294b94176fc2b02b14a709 Mon Sep 17 00:00:00 2001 From: Jeferson Siqueira Date: Sat, 9 Nov 2019 21:41:50 +0000 Subject: [PATCH] Add usage for buttons 4/5 (mouse scroll) to the volume widget. --- rc.lua.template | 2 +- themes/powerarrow-dark/theme.lua | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/rc.lua.template b/rc.lua.template index 2d30754..fe1189d 100644 --- a/rc.lua.template +++ b/rc.lua.template @@ -90,7 +90,7 @@ local chosen_theme = themes[5] local modkey = "Mod4" local altkey = "Mod1" 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 gui_editor = os.getenv("GUI_EDITOR") or "gvim" local browser = os.getenv("BROWSER") or "firefox" diff --git a/themes/powerarrow-dark/theme.lua b/themes/powerarrow-dark/theme.lua index 78204b4..29bc468 100644 --- a/themes/powerarrow-dark/theme.lua +++ b/themes/powerarrow-dark/theme.lua @@ -241,6 +241,16 @@ theme.volume = lain.widget.alsa({ widget:set_markup(markup.font(theme.font, " " .. volume_now.level .. "% ")) 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 local neticon = wibox.widget.imagebox(theme.widget_net)