Preface
I’m so excited with the release of Conky V1.10. The latest conky configuration is actualy a Lua file. It is very flexible, compared with the old plain text Conky Configuration. We can separate the long old conky TEXT, into separate Lua function.
One application benefit from this Conky Lua Config is i3status. Before we get too deep, let’s see the old way of configuring i3status with Conky.
Table of Content
-
Preface: Table of Content
-
2: Using i3bar
-
3: Plain Conky
-
6: Modular
-
7: Miscellanous
Screenshot
1: The i3 config
I assume that you have already familiar with i3 config.
Reading:
The only thing you need to concern is the bar
section.
We will change the status_command
few times.
You can check my dotfiles here
I put two configs, one the original i3-wm, and the other for i3-gaps.
Just copy one of them to ~/.config/i3/config
There are others i3 variant, e.g sway for wayland, and i3bgbar with powerline looks (deprecated). I haven’t explore the configuration yet.
In order to see change,
each time changing status_command
,
you must restart i3 with Mod+Shift+r
or utilizing command line.
2: Using i3bar
AFAIK there are three kind of configuration that can be used as a feed to i3bar.
i3status
Let’s copy the default i3status configuration.
And make your own customization.
i3blocks
Let’s copy the default i3blocks configuration.
And make your own customization.
Conky
Example
We can have many i3bar in i3wm. Each configured in different bar section.
3: Plain Conky
This is how we do conky in a very simple way, before Conky v.1.10, and without JSON.
And this is the conkyrc
file
Conky Config as Lua
Just like what I said before, the latest Conky v1.10 configuration is actually a Lua file.
And you see the difference in this conkyrc.lua
file.
Reading:
4: Conky as JSON Feed
Once again, we have to change the status_command
.
This time we are using a shell script to start json header.
And this script will call conky.
The conkyrc.lua
started
to look a bit complicated right now.
The conky.config
part is the same as above.
But the conky.text
is very different
to accomodate i3bar JSON protocol.
This script is only using two monitoring widgets,
it is mpd
and time
.
For many monitoring widget, we should reduce the complexity.
Reading
5: Modular
You can make your own modular script for your own needs. This just a sample.
The i3 config
Mine using two bars. Top and Bottom.
The Lua Helper
Since we want to reduce complexity,
we create a function for each json parts
in jsonhelper.lua
.
I provide few functions
- jsonhelper.separator()
- jsonhelper.icon()
- jsonhelper.text()
- jsonhelper.value()
- jsonhelper.common()
The last one is just a call to all other function at once [separator, icon, text, value]. So we call them in just one line.
The dollar $
syntax indicate conky variables.
You can check the rest of the file in github
If you need more icon you can copy-paste from FontAwesome cheatsheet, but be aware that it is not always work with other font.
The Parts Lua
Now we need another file to define conky parts as functions.
You can check the rest of the file in github
Main Conkyrc Script
Now we can call this script in conky.text
in main conkyrc.lua
file.
You can check the rest of the file in github
6: Miscellanous
Changing Color
This is a bonus parts. For your convenience I put two colorschemes. It is for dark and bright wallpaper. Of course you can add your own colorscheme.
Font Problem
Do not forget to install font to enable your icons.
Conclusion
After all this is just a config. You may modify this config to suit your needs.