about summary refs log tree commit diff
path: root/awesome
diff options
context:
space:
mode:
authorNguyễn Gia Phong <vn.mcsinyx@gmail.com>2018-03-15 20:12:47 +0700
committerNguyễn Gia Phong <vn.mcsinyx@gmail.com>2018-03-15 20:12:47 +0700
commite189ca45bd37c3ff9f1be8f312389d750e47373c (patch)
treedf67a8ecb5da5a2302ee6dcdf77dae4e4c9c3207 /awesome
parentf26bdd5643051420281f163b68d2a921276e3954 (diff)
downloaddotfiles-e189ca45bd37c3ff9f1be8f312389d750e47373c.tar.gz
Update 2018-03-15
Diffstat (limited to 'awesome')
-rw-r--r--awesome/.config/awesome/rc.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua
index 52578bb..b6d4b52 100644
--- a/awesome/.config/awesome/rc.lua
+++ b/awesome/.config/awesome/rc.lua
@@ -158,7 +158,12 @@ vicious.register(mymemusage, vicious.widgets.mem,
 myswpusage = wibox.widget.textbox() -- swap
 vicious.register(myswpusage, vicious.widgets.mem,
                  function(widget, args)
-                   return (" SWP%03d%%"):format(args[5])
+                   -- Without swap, args[5] will be nan
+                   if args[5] ~= args[5] then
+                     return ""
+                   else
+                     return (" SWP%03d%%"):format(args[5])
+                   end
                  end, 2)
 
 -- Create a battery widget