Manjaro Basic Tips for conky

Basic Tips for conky

From Manjaro
Revision as of 14:18, 25 October 2014 by imported>Excalibur1234 (→‎More)

Installation

Conky can be installed with this command:

sudo pacman -S conky


.conkyrc file

The entire conky is created from one file. by default, it is called .conkyrc file and the path is:

~/.conkyrc

or a longer file path:

/home/<username>/.conkyrc

Replace <username> with your user/account name.

All files with names starting with a dot . are hidden files. If you want to see hidden files in your file manager, you need to make them visible.


Code

The .conkyrc file can be edited with every text editor. It's code is split into two parts:

First Part

The first part contains all the configuration settings for the entire conky. Things like the position of the conky on your screen, transparency settings, border settings, the default font and it's size, and how often your conky gets updated.

Examples:

1. This will set the default font color of your conky to a white font. additionally, a color1 gets set using a Html Color Codeto a light blue:

default_color white
color1 0ab1ff

2. This enables Xft and sets the default Xft font (DejaVuSansCondensed) and it's size (11):

use_xft yes
xftfont DejaVuSansCondensed:weight=Bold:pixelsize=11

3. In order to position your conky on your screen, modify these settings:

alignment top_right
gap_x 18
gap_y 20

Your conky gets placed in the top right corner of your desktop with a horizontal gap of 18 pixels and a vertical gap of 20 pixels.


A great documentationof all possible configuration settings and their arguments is available. This part ends with a code line containing only one word: TEXT

Second Part

The second part contains the displayed conky code. Every code line after the TEXT separator corresponds to one displayed conky line on your desktop. There are a lot of variablesavailable for displaying and modifying all kinds of information.

Examples:

1. You can choose the color of your font using one of the following variables:

$color
${color1}

Every variable is marked with a $ sign and by { } brackets (only needed, if the variable contains more than one word).

2. You can call the default font (and it's size) with this command:

$font

If you want a different font and font size in your conky, use this command in your .conkyrc code:

${font DejaVuSerif:size=9}

4. This code line displays the kernel you are using (using $alignr just yields a nicer formatting): Kernel: $alignr$kernel

5. This variable gives you the latest 3 manjaro blog entry titles (using rss). It checks for updates every 60 minutes.

${rss http://manjaro.org/feed/ 60 item_titles 3}

6. Information about the root partition / of your manjaro installation is displayed using

Root: ${alignr}${fs_used /} of ${fs_size /}

7. Instead of example 4, you can use the following code to display the exact same information:

Kernel: $alignr${execi 3600 uname -r}

The variable ${execi 3600 XXXX} runs the XXXX bash code in your terminal every 3600 seconds and displays the result in your conky. The result of the uname -r bash command is your currently used kernel name.

Use any bash command instead of XXXX you can think of. The bash commands can be as long and complicated as you want.

Warning: Using complicated bash commands (e.g. which call other programs or use large files) with low intervals (e.g. ${execi 2 ....}) can use a lot of hardware resources and/or make your computer unresponsive.


Running conky

If you want to display a conky on your desktop a .conkyrc file with code in it is required. Next, open a terminal and run conky:

conky

or

conky -d

if you want to run conky as a background daemon.


If you want to run conky automatically after each boot of your computer, you need to find out how to autostart a program. This depends on the Desktop Manager you are using. After that running one of the following commands should work:

conky
conky -d
sh -c "sleep 10 && conky"
sleep 10 && conky


If you want to reload conky with the latest .conkyrc file (e.g. you changed a variable and want to see the consequences) use

killall conky && conky -d


More

After having read everything about conky, it is time to create your own. The easiest way for beginners is to look at screenshots of conkys and copy and paste the parts you like the most into your own .conkyrc file. Later, it can get modified. A dedicated conky thread in the Manjaro Forum with a lot of .conkyrc files and screenshots is available here. A massive conky thread is available in the Ubuntu forum. Searching on the Internet for .conkyrc can yield a lot of great .conkyrc files, too.

A detailed ArchWiki entryexists. It contains a lot of useful information and links.

The homepageof the conky project can be interesting, especially the documentation.

A forum discussion thread is available here

Troubleshooting & Tips

Missing rings

If (often colored) rings are missing in your conky, please install the following package:

yaourt -S conky-lua

Hereis help for installing packages from the Arch User Repository.

Missing network information

If network information is missing like download speed or network name (SSID), you need to replace the network card name in network variables in the .conkyrc file with your network card name.

Open a terminal an enter

ip a

in order to see all available network cards in your computer. A sample output looks like this:

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> ....
2: enp9s0: <BROADCAST,MULTICAST,UP,LOWER_UP> .....
3: wlp2s0: <BROADCAST,MULTICAST> .....

In this case, enp9s0 is the name of your ethernet card and wlp2s0 is the name of your wireless network card. Replace all network card names (e.g. wlan0, eth0) in network variables in your .conkyrc file with your preferred network card name.

FAQ

A detailed FAQ is available here

Tips

A great collection of tips and tricks is available in the Arch Wiki. Not all tips are meant for beginners, but a lot of .conkyrc code is explained very well - including the differences between Desktop Environments.



Alternative: Conky Manager

For everybody, who does not like to look at conky code and mess around in config files or who just wants a quick and simple conky, Conky Manager is great. Conky Manager offers a simple GUI for managing and customizing conkys. Additional theme packs are available, too.

Installation

yaourt -S conky-manager

Hereis help for installing packages from the Arch User Repository.

Additional information

Recently, a new version of Conky Managerhas been released. Shortly after, a couple of themepacks.

There are also themepacksavailable for the previous version. Full compatibility is not guaranteed, but they are definitely worth a try.

A Youtubevideo with basic tips is available as well.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.