diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-04-08 20:50:18 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-04-08 20:50:18 -0300 |
commit | d51354ae4f6f7bce9d44370616eff146c32f04c2 (patch) | |
tree | 122c9fee20cfe39de0e460b90bc9283a8381ed0f | |
parent | 5ab5e014d05215a133df2231885e0ea369938a51 (diff) | |
download | awesome-d51354ae4f6f7bce9d44370616eff146c32f04c2.tar.gz awesome-d51354ae4f6f7bce9d44370616eff146c32f04c2.tar.bz2 |
Run xconky refresh on resolution change
-rw-r--r-- | config.dot/awesome.link/keys.lua | 19 | ||||
-rw-r--r-- | config.dot/awesome.link/xrandr.lua | 7 |
2 files changed, 24 insertions, 2 deletions
diff --git a/config.dot/awesome.link/keys.lua b/config.dot/awesome.link/keys.lua index d83fe49..83929bc 100644 --- a/config.dot/awesome.link/keys.lua +++ b/config.dot/awesome.link/keys.lua @@ -33,7 +33,24 @@ globalkeys = awful.util.table.join(root.keys(), -- Xrandr -- See https://awesomewm.org/recipes/xrandr/ - awful.key({ modkey, }, "F7", function () xrandr.xrandr() end, {description = "", group = "client"}), + awful.key({ modkey, }, "F7", + function () + xrandr.xrandr() + + -- See https://awesomewm.org/apidoc/classes/gears.timer.html + -- https://www.reddit.com/r/linux/comments/6odeur/i3_automatically_resize_wallpaperconky_on/ + -- https://github.com/ritave/xeventbind + -- Any idea why this timer runs before intended? + --gears.timer { + -- timeout = 10, + -- autostart = true, + -- single_shot = true, + -- call_now = false, + -- callback = awful.spawn("xconky refresh") + --} + end, + {description = "toggle display", group = "client"} + ), -- Volume keys awful.key({ }, "XF86AudioRaiseVolume", function () awful.spawn("amixer set Master 9%+", false) end, {description = "volume up", group = "client"}), diff --git a/config.dot/awesome.link/xrandr.lua b/config.dot/awesome.link/xrandr.lua index bd90c19..dbf1445 100644 --- a/config.dot/awesome.link/xrandr.lua +++ b/config.dot/awesome.link/xrandr.lua @@ -1,4 +1,4 @@ ---- Separating Multiple Monitor functions as a separeted module (taken from awesome wiki) +--- Separating Multiple Monitor functions as a separated module (taken from awesome wiki) local awful = require("awful") local naughty = require("naughty") @@ -96,6 +96,11 @@ local function naughty_destroy_callback(reason) local action = state.index and state.menu[state.index - 1][2] if action then awful.util.spawn(action, false) + + -- See https://www.reddit.com/r/linux/comments/6odeur/i3_automatically_resize_wallpaperconky_on/ + -- https://github.com/ritave/xeventbind + awful.spawn("xconky refresh") + state.index = nil end end |