Difference between revisions of "Basic Tips for conky"
Views
Actions
Namespaces
Variants
Tools
added examples
imported>Excalibur1234 (added conky manager) |
imported>Excalibur1234 (added examples) |
||
Line 15: | Line 15: | ||
All files with names starting with a dot <code>.</code> are hidden files. If you want to see hidden files in your file manager, you need to make them visible. | All files with names starting with a dot <code>.</code> are hidden files. If you want to see hidden files in your file manager, you need to make them visible. | ||
=Code= | |||
The <code>.conkyrc</code> file can be edited with every text editor. It's code is split into two parts: | The <code>.conkyrc</code> 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 <code>color1</code> gets set using a [http://html-color-codes.info/ Html Color Code]to a light blue: | |||
default_color white | |||
color1 0ab1ff | |||
2. This sets the default font (DejaVuSansCondensed) and it's size (11): | |||
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 [http://conky.sourceforge.net/config_settings.html documentation]of all possible configuration settings and their arguments is available. | |||
This part ends with a code line containing only one word: <code>TEXT</code> | |||
==Second Part== | |||
The second part contains the displayed conky code. Every code line after the <code>TEXT</code> separator corresponds to one displayed conky line on your desktop. There are a lot of [http://conky.sourceforge.net/variables.html variables]available 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 <code>$</code> sign and by <code>{ }</code> 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 <code>.conkyrc</code> code: | |||
${font DejaVuSerif:size=9} | |||
4. This code line displays the kernel you are using (using <code>$alignr</code> 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 <code>/</code> 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 <code>${execi 3600 XXXX}</code> runs the <code>XXXX</code> bash code in your terminal every 3600 seconds and displays the result in your conky. The result of the <code>uname -r</code> bash command is your currently used kernel name. | |||
Use any bash command instead of <code>XXXX</code> 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. <code>${execi 2 ....}</code>) can use a lot of hardware resources and/or make your computer unresponsive. | |||
Line 38: | Line 89: | ||
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 | |||