From 138c158c3a0248f58c64adac350518502ed02bbf Mon Sep 17 00:00:00 2001 From: sandnon Date: Mon, 7 Oct 2013 16:15:51 +0800 Subject: [PATCH 1/2] Modify the battery display Use the icon ac when ac is connected. If ac is not conneted, battery should be present. If ac is connected and battery is not present, use the icon ac and the text N/A --- lain | 2 +- rc.lua.powerarrow-darker | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lain b/lain index e72deb9..c4879b5 160000 --- a/lain +++ b/lain @@ -1 +1 @@ -Subproject commit e72deb9de709a9adaa3a239a4e18ed641538de6e +Subproject commit c4879b5932e770ed9de37bee2818554460b68d76 diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index 09aacb7..9ce6556 100755 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -200,8 +200,7 @@ fswidgetbg = wibox.widget.background(fswidget, "#313131") baticon = wibox.widget.imagebox(beautiful.widget_battery) batwidget = lain.widgets.bat({ settings = function() - if bat_now.perc == "N/A" then - bat_now.perc = "AC" + if bat_now.ac == "online" then baticon:set_image(beautiful.widget_ac) elseif tonumber(bat_now.perc) <= 5 then baticon:set_image(beautiful.widget_battery_empty) From 04903255629a99b3c21a82a15e6ea83336ba09c9 Mon Sep 17 00:00:00 2001 From: sandnon Date: Mon, 7 Oct 2013 17:26:27 +0800 Subject: [PATCH 2/2] Modify the battery display Use the icon ac when ac is connected. When ac is not connected, battery should be present or compute will not boot. If ac is connected and battery is not present, use the icon ac and the text N/A --- lain | 2 +- rc.lua.powerarrow-darker | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lain b/lain index 88b5c74..9fb47c3 160000 --- a/lain +++ b/lain @@ -1 +1 @@ -Subproject commit 88b5c74a5936dce171a0a2723d45adfcd2f4368d +Subproject commit 9fb47c32cbf5f5019fc1d623785b23b6ea1d1f84 diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index 0f75e96..7267880 100755 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -200,8 +200,7 @@ fswidgetbg = wibox.widget.background(fswidget, "#313131") baticon = wibox.widget.imagebox(beautiful.widget_battery) batwidget = lain.widgets.bat({ settings = function() - if bat_now.perc == "N/A" then - bat_now.perc = "AC" + if bat_now.ac == "online" then baticon:set_image(beautiful.widget_ac) elseif tonumber(bat_now.perc) <= 5 then baticon:set_image(beautiful.widget_battery_empty)