]> git.rmz.io Git - dotfiles.git/blobdiff - awesome/conky.lua
mutt: use column with for html rendering
[dotfiles.git] / awesome / conky.lua
index 6a3fb168a9d93633332a3fc3539c3ef6c50c0c98..0f9eca9e5fd74e61ef9aa0c2d78bfbd3622f499d 100644 (file)
@@ -1,7 +1,7 @@
 -- http://awesome.naquadah.org/wiki/Conky_HUD
 local utils = require("utils")
 
 -- 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
     local clients = client.get()
     local conky = nil
     local i = 1
@@ -15,21 +15,26 @@ function get_conky()
     end
     return conky
 end
     end
     return conky
 end
-function raise_conky()
+
+local function raise_conky()
     local conky = get_conky()
     if conky
     then
         conky.ontop = true
     local conky = get_conky()
     if conky
     then
         conky.ontop = true
+        conky.hidden = false
     end
 end
     end
 end
-function lower_conky()
+
+local function lower_conky()
     local conky = get_conky()
     if conky
     then
         conky.ontop = false
     local conky = get_conky()
     if conky
     then
         conky.ontop = false
+        conky.hidden = true
     end
 end
     end
 end
-function toggle_conky()
+
+local function toggle_conky()
     local conky = get_conky()
     if conky
     then
     local conky = get_conky()
     if conky
     then
@@ -47,6 +52,7 @@ utils.rules.append({
                properties = { floating = true,
                               sticky = true,
                               ontop = false,
                properties = { floating = true,
                               sticky = true,
                               ontop = false,
+                              hidden = true,
                               focusable = true,
                               size_hints = {"program_position", "program_size"} 
                              } },
                               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))
 
 -- add global key
 utils.globalkeys.append(awful.key({}, "F4", function () raise_conky() end, function () lower_conky() end))
+
+utils.run_once("conky")