X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/bf69828c6125e3466e023dc458565939b7437e5b..8b4070b51e98191e73b51fc28c42b8a10e0d92dc:/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")