From: Samir Benmendil Date: Sat, 15 Jun 2013 02:52:24 +0000 (+0200) Subject: make functions local, actually run conky X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/c2870a4932b7ad872f0a3f69579a1e837961a97e make functions local, actually run conky --- diff --git a/awesome/conky.lua b/awesome/conky.lua index 6a3fb16..fa1c3f5 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,24 @@ function get_conky() end return conky end -function raise_conky() + +local function raise_conky() local conky = get_conky() if conky then conky.ontop = true end end -function lower_conky() + +local function lower_conky() local conky = get_conky() if conky then conky.ontop = false end end -function toggle_conky() + +local function toggle_conky() local conky = get_conky() if conky then @@ -54,3 +57,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")