A simple text based layout widget for awesome WM.
textlayout-widget {
tile = "[]="
}
The rightmost widget is the tile layout symbol ([]=
) used in DWM.
Copy widget file in your config files using:
cd ~/.config/awesome
git clone https://github.com/nullbyto/textlayout-widget widgets/textlayout-widget
cd ~/.config/awesome
curl https://github.com/nullbyto/textlayout-widget/textlayout-widget.lua --create-dirs -o widgets/textlayout-widget.lua
In your rc.lua
or where ever your bar configurations are:
local textlayout-widget = require("widgets.textlayout-widget")
-- Your widget can now be used
Add it to your wibox (without customization):
-- Add widgets to the wibox
s.mywibox:setup {
...,
{ -- Left widgets
...,
textlayout-widget {},
},
}
If you want customization, you can just add a specific layout name as argument to the constructor:
-- Add widgets to the wibox
s.mywibox:setup {
...,
{ -- Left widgets
...,
textlayout-widget {
tile = "hello",
floating = "i float",
},
},
}
alternatively you can do that in a variable:
local textlayout-widget = require("widgets.textlayout-widget")
-- Your widget can now be used
local textlayout = textlayout-widget {
tile = "hello",
floating = "i float",
}
and then down here, you just pass the variable:
-- Add widgets to the wibox
s.mywibox:setup {
...,
{ -- Left widgets
...,
textlayout,
},
}
tile = "[]=",
fairv = "==",
max = "[M]",
floating = "><>",
dwindle = "[\\\\]",
spiral = "[@]",
Reference: https://awesomewm.org/doc/api/libraries/awful.layout.html
cornernw
cornerne
cornersw
cornerse
fairh
fairv
floating
magnifier
max
fullscreen
spiral
dwindle
tile
tiletop
tilebottom
tileleft
- Any layout not set as default nor manually customized by the user will just use the name of the layout from the above list.
- Tested only on Awesome 4.3 (probably works on 4.0+)