Add a widget displaying the screen number

This commit is contained in:
Alexander Gehrke 2019-12-10 14:49:28 +01:00
parent a712bc07bd
commit 364ec85884
2 changed files with 9 additions and 0 deletions

1
rc.lua
View file

@ -35,6 +35,7 @@ for s in screen do
local clock = widgets.add.clock("clock", ltop)
widgets.add.text(" (S:" .. s.index .. ") ", lbottom)
widgets.add.layout_indicator(lbottom)
widgets.add.taglist("tags", lbottom)

View file

@ -287,6 +287,14 @@ local function spacerwidget(parent)
end --}}}
widgets.add.spacer = spacerwidget
-- manual spacing between widgets
local function textwidget(text, parent)
local newtext = wibox.widget.textbox()
newtext:set_text(text)
parent.container:add(newtext)
end --}}}
widgets.add.text = textwidget
-- change appearance of spacers
local function spacertext(text)
spacer:set_text(text)