diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2024-05-30 15:20:50 +0200 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2024-05-30 15:22:02 +0200 |
commit | 59af2386fcd0e06730a5a776a08a40740c07ad5f (patch) | |
tree | a0873d8ef43ee30d077a93afafd938429a8f0d5f | |
parent | 85ee18e88f6e9ee3f6a902a004d0000aea0fc541 (diff) | |
download | awesome-configs-59af2386fcd0e06730a5a776a08a40740c07ad5f.tar.xz |
rc.lua: volwidget caching and map brightness keys
-rw-r--r-- | rc.lua | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -92,6 +92,7 @@ mydnicon = wibox.widget.imagebox(home .. "/.config/awesome/icons/down.png", fals myupicon = wibox.widget.imagebox(home .. "/.config/awesome/icons/up.png", false) -- Initialize widget mynetwidget = wibox.widget.textbox() +-- Register widget vicious.register(mynetwidget, vicious.widgets.net, '<span color="' .. beautiful.fg_netdn_widget ..'">${eth0 down_kb}</span> <span color="' .. beautiful.fg_netup_widget ..'">${eth0 up_kb}</span>', 3) @@ -101,6 +102,9 @@ vicious.register(mynetwidget, vicious.widgets.net, '<span color="' myvolicon = wibox.widget.imagebox(home .. "/.config/awesome/icons/vol.png", false) -- Initialize widget myvolwidget = wibox.widget.textbox() +-- Enable caching +vicious.cache(vicious.widgets.volume) +-- Register widget vicious.register(myvolwidget, vicious.widgets.volume, "$1%", 2, "Master") -- Register buttons myvolwidget:buttons(gears.table.join( @@ -113,18 +117,18 @@ myvolwidget:buttons(gears.table.join( -- {{{ Date and time mydateicon = wibox.widget.imagebox(home .. "/.config/awesome/icons/time.png", false) -- Initialize widgets -mydatewidget = wibox.widget.textbox() +mydatewidget = wibox.widget.textbox() mydatestwidget = wibox.widget.textbox() -- Register widgets -vicious.register(mydatewidget, vicious.widgets.date, "%R", 61) -- Amsterdam +vicious.register(mydatewidget, vicious.widgets.date, "%R", 61) -- Amsterdam vicious.register(mydatestwidget, vicious.widgets.date, "%R", 61, -21600) -- New York -- Register buttons mydatewidget:buttons(gears.table.join( -- GTK3 calendar applet with holidays: https://sysphere.org/~anrxc/local/sources/pylendar.py - awful.button({ }, 1, function () exec(home .. "/code/bin/pylendar.py") end) + awful.button({ }, 1, function () exec(home .. "/bin/pylendar.py") end) )) mydatestwidget:buttons(gears.table.join( - awful.button({ }, 1, function () exec(home .. "/code/bin/pylendar.py") end) + awful.button({ }, 1, function () exec(home .. "/bin/pylendar.py") end) )) -- }}} @@ -321,6 +325,10 @@ globalkeys = gears.table.join( {description = "lock the screen", group = "launcher"}), awful.key({}, "#198", function () awful.spawn("amixer set Capture toggle") end, {description = "mute the microphone", group = "launcher"}), + awful.key({}, "#233", function () awful.spawn(home .. "/bin/plight.py -a -c plus") end, + {description = "increase brightness", group = "launcher"}), + awful.key({}, "#232", function () awful.spawn(home .. "/bin/plight.py -a -c minus") end, + {description = "decrease brightness", group = "launcher"}), -- Applications awful.key({ altkey, }, "F1", function () awful.spawn(terminal) end, |