mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-23 02:08:35 +02:00
widget: use empty string for battery widget when not available
This commit is contained in:
parent
89af7feb58
commit
a882194432
1 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@ vicious.register(cpuwidget, vicious.widgets.cpu,
|
|||
end, 2)
|
||||
|
||||
-- Battery
|
||||
local batwidget = nil
|
||||
local batwidget = ""
|
||||
if config.hostname == "guybrush" then
|
||||
batwidget = widget({ type = "textbox" })
|
||||
vicious.register(batwidget, vicious.widgets.bat,
|
||||
|
@ -155,7 +155,7 @@ for s = 1, screen.count() do
|
|||
onfirst(systray), onfirst(separator),
|
||||
datewidget, separator,
|
||||
onsecond(volwidget), onsecond(separator),
|
||||
onsecond(batwidget), onsecond(batwidget and separator or nil),
|
||||
onsecond(batwidget), onsecond(batwidget ~= "" and separator or nil),
|
||||
onsecond(fswidget), onsecond(separator),
|
||||
onfirst(memwidget), onfirst(separator),
|
||||
onfirst(cpuwidget), onfirst(separator),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue