X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/bf69828c6125e3466e023dc458565939b7437e5b..4322868924b51e28d1e5d0cd48043a09bee6b60e:/awesome/conky.lua diff --git a/awesome/conky.lua b/awesome/conky.lua index 6a3fb16..0f9eca9 100644 --- a/awesome/conky.lua +++ b/awesome/conky.lua @@ -1,7 +1,7 @@ -- http://awesome.naquadah.org/wiki/Conky_HUD local utils = require("utils") -function get_conky() +local function get_conky() local clients = client.get() local conky = nil local i = 1 @@ -15,21 +15,26 @@ function get_conky() end return conky end -function raise_conky() + +local function raise_conky() local conky = get_conky() if conky then conky.ontop = true + conky.hidden = false end end -function lower_conky() + +local function lower_conky() local conky = get_conky() if conky then conky.ontop = false + conky.hidden = true end end -function toggle_conky() + +local function toggle_conky() local conky = get_conky() if conky then @@ -47,6 +52,7 @@ utils.rules.append({ properties = { floating = true, sticky = true, ontop = false, + hidden = true, focusable = true, size_hints = {"program_position", "program_size"} } }, @@ -54,3 +60,5 @@ utils.rules.append({ -- add global key utils.globalkeys.append(awful.key({}, "F4", function () raise_conky() end, function () lower_conky() end)) + +utils.run_once("conky")