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

improve battery status monitor
authormartin f. krafft <madduck@madduck.net>
Thu, 9 Apr 2009 13:53:33 +0000 (15:53 +0200)
committermartin f. krafft <madduck@madduck.net>
Thu, 9 Apr 2009 13:53:33 +0000 (15:53 +0200)
.config/awesome/rc.lua

index c7cd4055cab163d20bbeee815348955ea56fde18..257ac3c135ebb0caf125d4664cffb5c6d73d3bda 100644 (file)
@@ -570,15 +570,12 @@ function get_acpibatt()
     end
 
     if status == 'Charging' then
-      status = '+';
+      return '↑ ' .. percent;
     elseif status == 'Discharging' then
-      status = '-';
+      return '↓ '.. time;
     else
-      status = 'x';
+      return '';
     end
-
-    return status .. ' ' .. time;
-    -- return percent .. ' (' .. status .. ')'; -- .. ' ' .. time .. ' left';
 end
 -- }}}
 
@@ -600,7 +597,7 @@ end
 --}}}
 
 -- Set up some hooks
-awful.hooks.timer.register(120, hook_battery)
+awful.hooks.timer.register(20, hook_battery)
 -- awful.hooks.timer.register(5, get_bat)
 -- }}}