mirror of
https://github.com/lcpz/awesome-copycats.git
synced 2026-03-23 14:05:11 +00:00
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
This commit is contained in:
parent
aadebca993
commit
0490325562
2
lain
2
lain
|
|
@ -1 +1 @@
|
||||||
Subproject commit 88b5c74a5936dce171a0a2723d45adfcd2f4368d
|
Subproject commit 9fb47c32cbf5f5019fc1d623785b23b6ea1d1f84
|
||||||
|
|
@ -200,8 +200,7 @@ fswidgetbg = wibox.widget.background(fswidget, "#313131")
|
||||||
baticon = wibox.widget.imagebox(beautiful.widget_battery)
|
baticon = wibox.widget.imagebox(beautiful.widget_battery)
|
||||||
batwidget = lain.widgets.bat({
|
batwidget = lain.widgets.bat({
|
||||||
settings = function()
|
settings = function()
|
||||||
if bat_now.perc == "N/A" then
|
if bat_now.ac == "online" then
|
||||||
bat_now.perc = "AC"
|
|
||||||
baticon:set_image(beautiful.widget_ac)
|
baticon:set_image(beautiful.widget_ac)
|
||||||
elseif tonumber(bat_now.perc) <= 5 then
|
elseif tonumber(bat_now.perc) <= 5 then
|
||||||
baticon:set_image(beautiful.widget_battery_empty)
|
baticon:set_image(beautiful.widget_battery_empty)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue