]> git.madduck.net Git - etc/awesome.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

wiki enhanced
authorcopycat-killer <dada@archlinux.info>
Fri, 27 Jan 2017 13:35:27 +0000 (14:35 +0100)
committercopycat-killer <dada@archlinux.info>
Fri, 27 Jan 2017 13:35:27 +0000 (14:35 +0100)
widgets/contrib/tpbat/init.lua
widgets/cpu.lua
widgets/mem.lua
widgets/net.lua
widgets/sysload.lua
widgets/temp.lua
wiki

index e65cde82f3fac20d52a7cde12dd9eb6e0a901952..20a10f4140e6dbf61e250449e050a13c353d9411 100644 (file)
@@ -108,7 +108,7 @@ function tpbat.register(args)
         })
     end
 
-    function update()
+    function tpbat.update()
         bat_now = {
             status = "Not present",
             perc   = "N/A",
@@ -151,12 +151,12 @@ function tpbat.register(args)
         settings()
     end
 
-    newtimer("tpbat-" .. bat.name, timeout, update)
+    newtimer("tpbat-" .. bat.name, timeout, tpbat.update)
 
     widget:connect_signal('mouse::enter', function () tpbat.show() end)
     widget:connect_signal('mouse::leave', function () tpbat.hide() end)
 
-    return tpbat.widget
+    return tpbat
 end
 
 return setmetatable(tpbat, { __call = function(_, ...) return tpbat.register(...) end })
index 79f99afa956e6dd2059d96e5eea7f245e44c2e6f..076b692c80279aac98b6035e8f5b74537d7f708d 100644 (file)
@@ -26,7 +26,7 @@ local function worker(args)
 
     cpu.widget = wibox.widget.textbox()
 
-    function update()
+    function cpu.update()
         -- Read the amount of time the CPUs have spent performing
         -- different kinds of work. Read the first line of /proc/stat
         -- which is the sum of all CPUs.
@@ -74,7 +74,7 @@ local function worker(args)
         settings()
     end
 
-    helpers.newtimer("cpu", timeout, update)
+    helpers.newtimer("cpu", timeout, cpu.update)
 
     return cpu
 end
index 2b414ef1bb31156b80749ce05eb5283ba2ef16d6..7b717ef7aca05e7e016b9fd5c3170017f10db9e2 100644 (file)
@@ -25,7 +25,7 @@ local function worker(args)
 
     mem.widget = wibox.widget.textbox()
 
-    function update()
+    function mem.update()
         mem_now = {}
         for line in lines("/proc/meminfo") do
             for k, v in gmatch(line, "([%a]+):[%s]+([%d]+).+") do
@@ -48,7 +48,7 @@ local function worker(args)
         settings()
     end
 
-    helpers.newtimer("mem", timeout, update)
+    helpers.newtimer("mem", timeout, mem.update)
 
     return mem
 end
index 1dfef43afbbd6e4f84e969dcef9aadd04f28c3d9..223f3aff15f409e8518727c54a7d4475ce5d9a65 100644 (file)
@@ -97,12 +97,10 @@ local function worker(args)
                 helpers.set_map(dev, true)
             end
 
-            -- Old api compatibility
             net_now.carrier      = dev_now.carrier
             net_now.state        = dev_now.state
-            -- And new api
             net_now.devices[dev] = dev_now
-            -- With the new api new_now.sent and net_now.received will be the
+            -- new_now.sent and net_now.received will be the
             -- totals across all specified devices
         end
 
index 49f640ce85e6242eeff3ad335ede38de8b417b06..df9dbea06bfeb265febeab5ba015cce3c15833c9 100644 (file)
@@ -24,7 +24,7 @@ local function worker(args)
 
     sysload.widget = wibox.widget.textbox()
 
-    function update()
+    function sysload.update()
         local f = io.open("/proc/loadavg")
         local ret = f:read("*all")
         f:close()
@@ -35,7 +35,7 @@ local function worker(args)
         settings()
     end
 
-    helpers.newtimer("sysload", timeout, update)
+    helpers.newtimer("sysload", timeout, sysload.update)
 
     return sysload
 end
index 9f41fdbbc7522e1590f9bb82a56194db2fa0a76e..1c7e86c92de8e3074eece379457d427ebb1093e0 100644 (file)
@@ -24,7 +24,7 @@ local function worker(args)
 
     temp.widget = wibox.widget.textbox()
 
-    function update()
+    function temp.update()
         local f = io.open(tempfile)
         if f then
             coretemp_now = tonumber(f:read("*all")) / 1000
@@ -37,7 +37,7 @@ local function worker(args)
         settings()
     end
 
-    helpers.newtimer("coretemp", timeout, update)
+    helpers.newtimer("coretemp", timeout, temp.update)
 
     return temp
 end
diff --git a/wiki b/wiki
index ed824beb75262f9f78e49baa6e1a591220ca5249..425169b35b105e5a240997ff8f5aa12bec6099cb 160000 (submodule)
--- a/wiki
+++ b/wiki
@@ -1 +1 @@
-Subproject commit ed824beb75262f9f78e49baa6e1a591220ca5249
+Subproject commit 425169b35b105e5a240997ff8f5aa12bec6099cb