]> git.rmz.io Git - dotfiles.git/blobdiff - awesome/conky.lua
Merge branch 'master' of rmz.io:dotfiles
[dotfiles.git] / awesome / conky.lua
index 0f9eca9e5fd74e61ef9aa0c2d78bfbd3622f499d..71996cfac632612797c6181c6a4422e56fa8f5ef 100644 (file)
@@ -2,60 +2,53 @@
 local utils = require("utils")
 
 local function get_conky()
-    local clients = client.get()
-    local conky = nil
-    local i = 1
-    while clients[i]
-    do
-        if clients[i].class == "Conky"
-        then
-            conky = clients[i]
-        end
-        i = i + 1
+  local clients = client.get()
+  local conky = nil
+  local i = 1
+  while clients[i] do
+    if clients[i].class == "Conky" then
+      conky = clients[i]
     end
-    return conky
+    i = i + 1
+  end
+  return conky
 end
 
 local function raise_conky()
-    local conky = get_conky()
-    if conky
-    then
-        conky.ontop = true
-        conky.hidden = false
-    end
+  local conky = get_conky()
+  if conky then
+    conky.ontop = true
+    conky.hidden = false
+  end
 end
 
 local function lower_conky()
-    local conky = get_conky()
-    if conky
-    then
-        conky.ontop = false
-        conky.hidden = true
-    end
+  local conky = get_conky()
+  if conky then
+    conky.ontop = false
+    conky.hidden = true
+  end
 end
 
 local function toggle_conky()
-    local conky = get_conky()
-    if conky
-    then
-        if conky.ontop
-        then
-            conky.ontop = false
-        else
-            conky.ontop = true
-        end
+  local conky = get_conky()
+  if conky then
+    if conky.ontop then
+      conky.ontop = false
+    else
+      conky.ontop = true
     end
+  end
 end
 
 utils.rules.append({
-    { rule = { class = "Conky" },
-               properties = { floating = true,
-                              sticky = true,
-                              ontop = false,
-                              hidden = true,
-                              focusable = true,
-                              size_hints = {"program_position", "program_size"} 
-                             } },
+  { rule = { class = "Conky" },
+             properties = { floating = true,
+                            sticky = true,
+                            ontop = false,
+                            hidden = true,
+                            focusable = true,
+                            size_hints = {"program_position", "program_size"} } },
 })
 
 -- add global key