How to Setup ConkyMatic on Arch Linux

In this article, we're going to look at how to get ConkyMatic up and running Arch Linux. ConkyMatic is a Linux tool written in Bash to be used as an automatic color scheme changer for conky. It changes the color scheme of your system based on the current wallpaper colors. This gives your conky a candy and unique look, which is dynamic since your wallpapers can keep changing. The heart of this tool is Conky and ImageMagick.

Introduction to Conky

For those new to Conky, Conky is a system monitor software for the X Window System. Conky is able to monitor many system variables including CPU, memory, swap, disk space, temperature, top, upload, download, system messages, and much more. It is suitable to use with either Desktop Environment or a light window manager like i3wm.

ConkyMatic core

ConkyMatic uses ImageMagick to generate the color palette PNG and weather icons. If you have Inkscape running on your system, it will be used for icon rendering since it has better SVG handling. However, ImageMagick is still necessary for the palette generation.

Install Dependencies for ConkyMatic

The dependencies to be installed are:

  • Conky
  • ImageMagick & Inkscape
  • curl
  • Roboto Font
  • git

Install the first three required packages by running:

$ sudo pacman -S git conky imagemagick inkscape curl

Create a local configuration file for conky using:

$ mkdir -p ~/.config/conky
$ conky -C > ~/.config/conky/conky.conf

To get the required font, download from the link Roboto Font and add it to your Arch. See Conky configurations samples.

Installing ConkyMatic

Now that we have all the packages we need, let's clone ConkyMatic from Github and start the installation. Make sure you install git as shown above.

$ cd ~
$ git https://github.com/rickellis/ConkyMatic.git
Cloning into 'ConkyMatic'...
remote: Counting objects: 482, done.
remote: Compressing objects: 100% (52/52), done.
remote: Total 482 (delta 44), reused 55 (delta 22), pack-reused 404
Receiving objects: 100% (482/482), 363.23 KiB | 55.00 KiB/s, done.
Resolving deltas: 100% (183/183), done.

Modify the file conkymatic.sh accordingly.

$ cd ConkyMatic
$ vim conkymatic.sh

Modify variables like:

AUTO_PATH_MODE=
AUTO_MODE=
YOUR_CITY=
YOUR_REGION=
TEMP_FORMAT=
...

AUTO_MODE must be either "xfce" or "feh".

Save changes once done.

Using ConkyMatic

Since ConkyMatic is a bash script, it can be directly executed on the terminal using the command.

$ ./conkymatic.sh
Here we go!
Path Validation: The feh config file contains a valid wallpaper path
Downloading Yahoo weather JSON data for laramie, wy
Generating color palette based on the current wallpaper colors
...

At the end of starting, you should get lines like below:

....
Building a randomized color map
Exporting weather icons using Inkscape
Exporting Image 49 .................................................
Caching the current weather and forecast icons
Inserting color values into the conky template
Shutting down Conky
Exporting new .conkyrc file
Relaunching Conky
Done!

But notice that you have to be in the same directory as cloned content. Notice that you can pass a path to your wallpaper as the argument to this command. Example is:

$ ./conkymatic.sh /path/to/your/wallpaper.jpg

It is a good practice to backup your  .conkyrc file before running conkymatic.sh script. To back it up, use the command.

$ cp ~/.config/conky/conky.conf ~/.config/conky/conky.conf.bak

Easy starting of ConkyMatic using a bash function

To make starting of ConkyMatic easy, consider adding the function below to your .bashrc if using bash shell or .zshrc if using Zsh.

$ tail  ~/.bashrc

function conkymatic() {
 $HOME/path/to/ConkyMatic/conkymatic.sh [email protected]
}

The next time you want to run conkymatic, just call the function using its name on the terminal.

$ conkymatic

Further Customization

In the Templates directory, there is a default.conky template. This is a normal .conkyrc file with some pseudo-variables that get replaced by the script with random color values. Additional templates can be created and added to the Templates folder. If no template is specified when starting, it will default to the default.conky one.

Available variables for template customization are:

_VAR:COLOR_TIME_
_VAR:COLOR_DATE_
_VAR:COLOR_WEATHER_
_VAR:COLOR_HEADING_
_VAR:COLOR_SUBHEADING_
_VAR:COLOR_TEXT_
_VAR:COLOR_DATA_
_VAR:COLOR_HR_
_VAR:COLOR_BARS_NORM_
_VAR:COLOR_BARS_WARN_
_VAR:COLOR_BORDER_
_VAR:COLOR_BACKGROUND_
_VAR:JSON_FILEPATH_
_VAR:CACHE_DIRECTORY_
_VAR:WEATHER_ICONS_PNG_DIRECTORY_
_VAR:COLOR_PALETTE_FILEPATH_

Conclusion

ConkyMatic is an interesting tool which can give your screen an awesome look and feel. Some prior knowledge of Conky is beneficial though not necessary. Try it and let us know how you feel. If you're stuck trying to set it up, drop a comment and we'll be happy to help.

Josphat Mutai 12:05 am

Comments

Your email address will not be published. Required fields are marked *

All comments are subject to moderation.

1 Comment

  1. There is one other important dependency for ConkyMatic... The command-line JSON processor "jq". It can be installed on Arch... 'sudo pacman -S jq'