lain: new commit
This commit is contained in:
parent
6763e8bf87
commit
0ecfb69ab1
2
lain
2
lain
|
@ -1 +1 @@
|
||||||
Subproject commit a4c86f9ace9dc5caad4f942af5d1be3eca47f666
|
Subproject commit 89ae5308061ac828b4f5002ba77c069585b1e088
|
|
@ -168,7 +168,7 @@ local batbar = wibox.widget {
|
||||||
}
|
}
|
||||||
local batupd = lain.widget.bat({
|
local batupd = lain.widget.bat({
|
||||||
settings = function()
|
settings = function()
|
||||||
if bat_now.status == "N/A" or type(bat_now.perc) ~= "number" then return end
|
if (not bat_now.status) or bat_now.status == "N/A" or type(bat_now.perc) ~= "number" then return end
|
||||||
|
|
||||||
if bat_now.status == "Charging" then
|
if bat_now.status == "Charging" then
|
||||||
baticon:set_image(theme.ac)
|
baticon:set_image(theme.ac)
|
||||||
|
|
|
@ -201,7 +201,6 @@ function ()
|
||||||
end)))
|
end)))
|
||||||
|
|
||||||
-- Battery
|
-- Battery
|
||||||
--[[
|
|
||||||
local bat = lain.widget.bat({
|
local bat = lain.widget.bat({
|
||||||
settings = function()
|
settings = function()
|
||||||
bat_header = " Bat "
|
bat_header = " Bat "
|
||||||
|
@ -212,7 +211,6 @@ local bat = lain.widget.bat({
|
||||||
widget:set_markup(markup.font(theme.font, markup(blue, bat_header) .. bat_p))
|
widget:set_markup(markup.font(theme.font, markup(blue, bat_header) .. bat_p))
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
--]]
|
|
||||||
|
|
||||||
-- fs
|
-- fs
|
||||||
theme.fs = lain.widget.fs({
|
theme.fs = lain.widget.fs({
|
||||||
|
|
|
@ -203,7 +203,7 @@ theme.fs = lain.widget.fs({
|
||||||
local baticon = wibox.widget.imagebox(theme.widget_battery)
|
local baticon = wibox.widget.imagebox(theme.widget_battery)
|
||||||
local bat = lain.widget.bat({
|
local bat = lain.widget.bat({
|
||||||
settings = function()
|
settings = function()
|
||||||
if bat_now.status ~= "N/A" then
|
if bat_now.status and bat_now.status ~= "N/A" then
|
||||||
if bat_now.ac_status == 1 then
|
if bat_now.ac_status == 1 then
|
||||||
widget:set_markup(markup.font(theme.font, " AC "))
|
widget:set_markup(markup.font(theme.font, " AC "))
|
||||||
baticon:set_image(theme.widget_ac)
|
baticon:set_image(theme.widget_ac)
|
||||||
|
|
|
@ -240,7 +240,7 @@ theme.fs = lain.widget.fs({
|
||||||
local baticon = wibox.widget.imagebox(theme.widget_battery)
|
local baticon = wibox.widget.imagebox(theme.widget_battery)
|
||||||
local bat = lain.widget.bat({
|
local bat = lain.widget.bat({
|
||||||
settings = function()
|
settings = function()
|
||||||
if bat_now.status ~= "N/A" then
|
if bat_now.status and bat_now.status ~= "N/A" then
|
||||||
if bat_now.ac_status == 1 then
|
if bat_now.ac_status == 1 then
|
||||||
widget:set_markup(markup.font(theme.font, " AC "))
|
widget:set_markup(markup.font(theme.font, " AC "))
|
||||||
baticon:set_image(theme.widget_ac)
|
baticon:set_image(theme.widget_ac)
|
||||||
|
|
|
@ -157,7 +157,7 @@ theme.fs = lain.widget.fs({
|
||||||
local bat = lain.widget.bat({
|
local bat = lain.widget.bat({
|
||||||
settings = function()
|
settings = function()
|
||||||
local perc = bat_now.perc
|
local perc = bat_now.perc
|
||||||
if bat_now.ac_status == 1 then perc = "Plug" end
|
if bat_now.ac_status == 1 then perc = perc .. " Plug" end
|
||||||
widget:set_markup(markup.font(theme.font, markup(gray, " Bat ") .. perc .. " "))
|
widget:set_markup(markup.font(theme.font, markup(gray, " Bat ") .. perc .. " "))
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue