don't print bat widget if no bat status

This commit is contained in:
vincent 2018-11-15 18:25:05 +01:00
parent 0b501c73f1
commit 61a6147c6b
2 changed files with 4 additions and 3 deletions

View File

@ -193,7 +193,7 @@ lain.widget.contrib.redshift:attach(
end
)
local mpdicon = wibox.widget.imagebox(beautiful.mpd)
local mpdicon = wibox.widget.imagebox(beautiful.mpd_icon)
local mpd = lain.widget.mpd({
settings = function()
mpd_notification_preset = {
@ -228,6 +228,8 @@ local bat = lain.widget.bat({
if bat_now.status then
perc = perc .. " " .. bat_now.status
else
return
end
widget:set_markup(markup.fontfg(beautiful.font, beautiful.fg_normal, perc .. " "))

View File

@ -129,8 +129,7 @@ theme.cpu_icon = icon_dir.."cpu.png"
theme.net_up = icon_dir .. "net_up.png"
theme.net_down = icon_dir .. "net_down.png"
theme.spr_right = icon_dir .. "spr_right.png"
theme.mpd = icon_dir .. "mpd.png"
theme.mpd_icon = icon_dir .. "mpd.png"
-- Generate Awesome icon:
theme.awesome_icon = theme_assets.awesome_icon(