From: martin f. krafft Date: Thu, 9 Apr 2009 13:53:33 +0000 (+0200) Subject: improve battery status monitor X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/35394d94c4a3c5ba45b1e7d7b201e77e504ae8a6?ds=sidebyside improve battery status monitor --- diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index c7cd405..257ac3c 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -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) -- }}}