]> 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:

small fixes
authorluke bonham <dadasignificanulla@gmail.com>
Fri, 13 Sep 2013 16:15:25 +0000 (18:15 +0200)
committerluke bonham <dadasignificanulla@gmail.com>
Fri, 13 Sep 2013 16:15:25 +0000 (18:15 +0200)
12 files changed:
helpers.lua
layout/uselesstile.lua
util/init.lua
util/markup.lua
widgets/alsa.lua
widgets/alsabar.lua
widgets/cpu.lua
widgets/fs.lua
widgets/imap.lua
widgets/mem.lua
widgets/net.lua
widgets/sysload.lua

index 81910d21b206bc2b151cdb9214b84e8bb80e4b3b..97cb7976f208b8253a9aa5d61c90f7723389ad5f 100644 (file)
@@ -1,10 +1,10 @@
 
 --[[
-                                                      
-     Licensed under GNU General Public License v2     
-      * (c) 2013,      Luke Bonham                    
-      * (c) 2010-2012, Peter Hofmann                  
-                                                      
+                                                  
+     Licensed under GNU General Public License v2 
+      * (c) 2013,      Luke Bonham                
+      * (c) 2010-2012, Peter Hofmann              
+                                                  
 --]]
 
 local debug  = require("debug")
@@ -46,7 +46,7 @@ end
 
 -- }}}
 
--- {{{ Timer maker 
+-- {{{ Timer maker
 
 helpers.timer_table = {}
 
index b82c97e7c9af529ae35c178745fc9f8f24a73fb4..cd288ed32d74c73f428ff44b69bb9fdd5f88fd0b 100644 (file)
@@ -11,7 +11,7 @@
 local tag       = require("awful.tag")
 local beautiful = require("beautiful")
 local ipairs    = ipairs
-local math      = { floor = math.floor, 
+local math      = { floor = math.floor,
                     max   = math.max,
                     min   = math.min }
 local tonumber  = tonumber
index a44d52c6527ec3acb4a97873253ff46bdcaca581..26f50ae8e545b70715a9fb23f9ec57981f9cd4ad 100644 (file)
@@ -1,15 +1,15 @@
 
 --[[
-                                                  
-     Lain                                         
-     Layouts, widgets and utilities for Awesome WM
-                                                  
-     Utilities section                            
-                                                  
-     Licensed under GNU General Public License v2 
-      * (c) 2013,      Luke Bonham                
-      * (c) 2010-2012, Peter Hofmann              
-                                                  
+                                                   
+     Lain                                          
+     Layouts, widgets and utilities for Awesome WM 
+                                                   
+     Utilities section                             
+                                                   
+     Licensed under GNU General Public License v2  
+      * (c) 2013,      Luke Bonham                 
+      * (c) 2010-2012, Peter Hofmann               
+                                                   
 --]]
 
 local awful        = require("awful")
@@ -17,7 +17,7 @@ local beautiful    = require("beautiful")
 local math         = { sqrt = math.sqrt }
 local mouse        = mouse
 local pairs        = pairs
-local string       = string
+local string       = { gsub = string.gsub }
 local client       = client
 local screen       = screen
 local tonumber     = tonumber
index dbb85292ce1723c7a09033eface927f99dfc388b..d367bca51c69eac91b8a8073b25ff99726229848 100644 (file)
@@ -1,11 +1,11 @@
 
 --[[
-                                              
-     Licensed under MIT License               
-      * (c) 2013, Luke Bonham                 
-      * (c) 2009, Uli Schlachter              
-      * (c) 2009, Majic                       
-                                              
+                                 
+     Licensed under MIT License  
+      * (c) 2013, Luke Bonham    
+      * (c) 2009, Uli Schlachter 
+      * (c) 2009, Majic          
+                                 
 --]]
 
 local beautiful    = require("beautiful")
index 3e025bbd252712f8f152e65c5a6fc783ffe8348c..28bb05c9514ad7aa11886e682529bae80f263c35 100644 (file)
@@ -1,10 +1,10 @@
 
 --[[
-                                                      
-     Licensed under GNU General Public License v2     
-      * (c) 2013, Luke Bonham                         
-      * (c) 2010, Adrian C. <anrxc@sysphere.org>      
-                                                      
+                                                  
+     Licensed under GNU General Public License v2 
+      * (c) 2013, Luke Bonham                     
+      * (c) 2010, Adrian C. <anrxc@sysphere.org>  
+                                                  
 --]]
 
 local newtimer        = require("lain.helpers").newtimer
index 8331c54ef50a0346a010f7626fe1985c8abf9eb4..d8f1731b287bb5ee219545f04b9cba03f6839b70 100644 (file)
@@ -15,7 +15,7 @@ local naughty      = require("naughty")
 
 local io           = { popen  = io.popen }
 local math         = { modf   = math.modf }
-local string       = { format = string.format, 
+local string       = { format = string.format,
                        match  = string.match,
                        rep    = string.rep }
 local tonumber     = tonumber
@@ -44,7 +44,7 @@ local alsabar =
      font      = beautiful.font:sub(beautiful.font:find(""), beautiful.font:find(" ")),
      font_size = "11",
      color     = beautiful.fg_focus,
-     bar_size  = 18 
+     bar_size  = 18
   },
 
   _current_level = 0,
@@ -122,7 +122,7 @@ local function worker(args)
         f:close()
 
         -- Capture mixer control state:          [5%] ... ... [on]
-        local volu, mute = string.match(mixer, "([%d]+)%%.*%[([%l]*)") 
+        local volu, mute = string.match(mixer, "([%d]+)%%.*%[([%l]*)")
 
         if volu == nil then
             volu = 0
index 55a3799457271598d60e05847480a23bf149bc49..0b21edc142fcdff284eb979d6b151712237fb450 100644 (file)
@@ -58,7 +58,8 @@ local function worker(args)
         local dactive = active - cpu.last_active
         local dtotal = total - cpu.last_total
 
-        usage = tostring(math.ceil((dactive / dtotal) * 100))
+        cpu_now = {}
+        cpu_now.usage = tostring(math.ceil((dactive / dtotal) * 100))
 
         widget = cpu.widget
         settings()
index 17037c4009c21535a6e83134f27a6d367c5b357b..b43405604ef5efd5b88336b2020f964d04d6a9d6 100644 (file)
@@ -64,7 +64,7 @@ local function worker(args)
     helpers.set_map("fs", false)
 
     function update()
-        fs_info = {} 
+        fs_info = {}
 
         local f = io.popen("LC_ALL=C df -kP")
 
@@ -95,7 +95,7 @@ local function worker(args)
 
         if used >= 99 and not helpers.get_map("fs")
         then
-            naughty.notify({ 
+            naughty.notify({
                 title = "warning",
                 text = partition .. " ran out!\nmake some room",
                 timeout = 8,
index 6574276221e54de1f138dc1e6389ddf9d781f576..605c1c482e24954a9592286412105ff8e196d6fa 100644 (file)
@@ -14,6 +14,7 @@ local wibox        = require("wibox")
 local io           = { popen  = io.popen }
 local string       = { format = string.format,
                        gsub   = string.gsub }
+local tonumber     = tonumber
 
 local setmetatable = setmetatable
 
@@ -52,7 +53,7 @@ local function worker(args)
             icon     = helpers.icons_dir .. "mail.png",
             position = "top_left"
         }
-        
+
         curl = string.format("%s --url imaps://%s:%s/INBOX -u %s:%s %s -k",
                head_command, server, port, mail, password, request)
 
@@ -62,6 +63,7 @@ local function worker(args)
 
         t, mailcount = string.gsub(ws, "%d", "")
         t = nil -- because it's useless
+        mailcount = tonumber(mailcount)
 
         widget = imap.widget
         settings()
index 78ed3e0a4076705e3254de5f9340de491c6806da..986fa7668c7be37a34145cad34f2906392d03c52 100644 (file)
@@ -1,10 +1,10 @@
 
 --[[
-                                                   
-     Licensed under GNU General Public License v2  
-      * (c) 2013,      Luke Bonham                 
-      * (c) 2010-2012, Peter Hofmann               
-                                                   
+                                                  
+     Licensed under GNU General Public License v2 
+      * (c) 2013,      Luke Bonham                
+      * (c) 2010-2012, Peter Hofmann              
+                                                  
 --]]
 
 local newtimer        = require("lain.helpers").newtimer
index b3deca6b471a68bd4e3640b9a4f54fc49874ca37..d79e117c2c4007cbf3e8ae7017a7b203ad1f34c6 100644 (file)
@@ -50,7 +50,7 @@ local function worker(args)
 
     helpers.set_map(iface, true)
 
-    function update() 
+    function update()
         net_now = {}
 
         if iface == "" then iface = net.get_device() end
index 868398c9f6b593855b67a6f47fd7785f54dd93a8..015573c6220fd649b46232bf69d58c7556d64a68 100644 (file)
@@ -32,7 +32,7 @@ local function worker(args)
         local f = io.open("/proc/loadavg")
         local ret = f:read("*all")
         f:close()
-        
+
         load_1, load_5, load_15 = string.match(ret, "([^%s]+) ([^%s]+) ([^%s]+)")
 
         widget = sysload.widget