Goal: Stacked statusbar with arrow decoration using lain library.
Let me introduce you a few decoration, using Lain library.
Instead using glyph, Awesome can also draw vector in its panel.
Oh yeah, Awesome also works well with GhostBSD.
Table of Content
Put the statusbar code at the end of the
and comment other statusbar.
Prerequisite: The Lain Library
You need the
lain library to draw arrow in panelbar,
as shape vector instead of glyph based.
If your distribution does not support lain library,
you can clone
Lain in AwesomeWM configuration directory.
Now you can include the
lain as any other library.
I also use google material color (
gmc.lua) to colorize the arrow.
For you impatient folks out there,
here I represent, all modules that we are going to use.
Do not get intimidated with codes above.
These can be explained step by step.
2: Stacked Bar
Arranging stacked bar in AwesomeWM 4.3 is easier than in 3.5 series.
All you need to do is add another panel, such as
tasklist as below:
Since I often change my taskbar place,
I do not want use
bottom as file helper name.
Instead I use
Task List Panel
You can either put the
tasklist at the bottom or on top.
Remove from Default Taskbar
Do not forget to remove
tasklist from the default taskbar.
3: Bottom Bar: Arrow
How about drawing arrow in panelbar without glyph ?
This will give us more arrow color that we can set on the fly.
Initialize Common Variable
Now we can define any variable with
To make our life easier, consider make a shortcut:
Since this is just an example, we are going to use only one icon:
In this case I put cat icon in the theme
Now we are ready to use them in these examples:
Left Arrow Example
Right Arrow Example
Now it is a good time to call both in one bottom panel.
In a more sophisticated panel,
we can have more stuff between arrow as below:
The custom example here is intended to show,
that this customization free to use any library,
The Custom Helper File
First thing first,
we need to setup the header.
The object between Lua file:
The uptime widget, an icon and empty textbox.
We are not finished yet,
we need to show the
uptime textbox for the first time,
Then regularly update the
uptime textbox using timer at specified interval.
Put these lines
And if you execute you will get the result as figure below:
Do not forget to add
And the result is:
What is Next?
Now that we are done with stacked statusbar,
learning how to make simple custom widget,
we should be ready for a more complex statusbar,
such as using
vicious library, or
Consider continue reading [ Awesome WM - Statusbar - Vicious ].