Moderators, translator
455
edits
imported>Dalto (General clean-up, remove outdated links/references, formatting) |
(general reformatting and proofreading) |
||
Line 1: | Line 1: | ||
__TOC__ | __TOC__ | ||
==Installation== | |||
=Installation= | |||
Conky can be installed with this command: | Conky can be installed with this command: | ||
{{UserCmd|command=pamac install conky}} | |||
==Configuration== | |||
All file 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. In most file managers this will be available in the options. | All file 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. In most file managers this will be available in the options. | ||
===Configuration file=== | |||
The default configuration file is located in <code>/usr/share/doc/conky-1.11.5_pre/conky.conf</code> where version are subject to change. | |||
Conky do not create a local conky folder so you will have to create beforehand | |||
{{UserCmd|command=mkdir -p ~/.config/conky}} | |||
Then copy the default to home | |||
{{UserCmd|command=cp /usr/share/doc/conky-1.11.5_pre/conky.conf ~/.config/conky/conky.conkyrc}} | |||
The configuation file is a simple text file and the content written using [[https://www.lua.org/|LUA syntax]] and is split into two parts | |||
* Configuration | |||
* Text | |||
== | ===Conky configuration=== | ||
The first/upper 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. | The first/upper 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. | ||
The whole configuration belong between these two accolade: | The whole configuration belong between these two accolade: | ||
{{File|file=~/.config/conky/conky.conkyrc| | |||
content=<pre>conky.config = { | |||
} | |||
</pre> | |||
}} | |||
Some rules to respect: | Some rules to respect: | ||
Every line end with <code>,</code> | * Every line end with <code>,</code> | ||
* Non-boolean/numerical value should be placed between <code>'</code> | |||
Non-boolean/numerical value should be placed between <code>'</code> | * Comment start with <code>--</code> | ||
Comment start with <code>--</code> | |||
====Examples:==== | |||
'''1.''' This will set the default font color of your conky to white. Additionally, a <code>color1</code> gets set using a [http://html-color-codes.info/ Html Color Code]to a light blue: | '''1.''' This will set the default font color of your conky to white. Additionally, a <code>color1</code> gets set using a [http://html-color-codes.info/ Html Color Code]to a light blue: | ||
{{File|file=~/.config/conky/conky.conkyrc| | |||
content=<pre>conky.config = { | |||
... | |||
default_color = 'white', -- White default color | |||
color1 = '0ab1ff', -- Light blue | |||
... | |||
} | |||
</pre> | |||
}} | |||
'''2.''' This enables Xft, set the default font (LiberationMono), make it bold and set it's size (8): | '''2.''' This enables Xft, set the default font (LiberationMono), make it bold and set it's size (8): | ||
{{File|file=~/.config/conky/conky.conkyrc| | |||
content=<pre>conky.config = { | |||
... | |||
use_xft = true, | |||
font = 'LiberationMono:bold:size=8', | |||
... | |||
} | |||
</pre> | |||
}} | |||
'''3.''' In order to position your conky on your screen, modify these settings: | '''3.''' In order to position your conky on your screen, modify these settings: | ||
{{File|file=~/.config/conky/conky.conkyrc| | |||
content=<pre>conky.config = { | |||
... | |||
alignment = 'top_right', -- Conky gets placed in the top right corner of your desktop | |||
gap_x 18, -- with a horizontal gap of 18 pixels (to your right screen edge) | |||
gap_y 20, -- and a vertical gap of 20 pixels (to your top screen edge). | |||
... | |||
} | |||
</pre> | |||
}} | |||
'''4.''' In some case you can have multiple values for one setting, they will be separated by a coma: | '''4.''' In some case you can have multiple values for one setting, they will be separated by a coma: | ||
{{File|file=~/.config/conky/conky.conkyrc| | |||
content=<pre>conky.config = { | |||
... | |||
own_window_hints = 'undecorated,sticky,skip_taskbar,skip_pager,below', | |||
... | |||
} | |||
</pre> | |||
}} | |||
Use the command: <code>man conky</code>, and look into the '''CONFIGURATION SETTINGS''' section to see every settings available. | Use the command: <code>man conky</code>, and look into the '''CONFIGURATION SETTINGS''' section to see every settings available. | ||
===Conky text=== | |||
== | |||
The second part contains the displayed conky code. Every code line corresponds to one displayed line on your desktop. There are a lot of available for displaying and modifying all kinds of information. Use the command: <code>man conky</code>, and look into the '''OBJECTS/VARIABLES''' section to see every objects/variables available. | The second part contains the displayed conky code. Every code line corresponds to one displayed line on your desktop. There are a lot of available for displaying and modifying all kinds of information. Use the command: <code>man conky</code>, and look into the '''OBJECTS/VARIABLES''' section to see every objects/variables available. | ||
{{Info|The lines in the '''conky.text''' section is printed exactly as is. E.g. if you create an empty line between sections - conky will display an empty line.}} | |||
The whole code belong between these two double bracket: | The whole code belong between these two double bracket: | ||
{{File|file=~/.config/conky/conky.conkyrc| | |||
content=<pre>conky.text = [[ | |||
]]</pre> | |||
}} | |||
====Examples:==== | |||
'''1.''' You can choose the color of your font using one of the following variables: | |||
{{File|file=~/.config/conky/conky.conkyrc| | |||
content=<pre>conky.text = [[ | |||
... | |||
${color} | |||
${color1} | |||
... | |||
]]</pre> | |||
}} | |||
Every variable is marked with a <code>$</code> sign and by <code>{ }</code> brackets (only needed, if the variable contains more than one word). | 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: | '''2.''' You can call the default font (and it's size) with this command: | ||
{{File|file=~/.config/conky/conky.conkyrc| | |||
content=<pre>conky.text = [[ | |||
... | |||
$font | |||
... | |||
]]</pre> | |||
}} | |||
If you want a different font (DejaVuSerif) and font size (9) in your conky, use this command in your <code>.conkyrc</code> code: | If you want a different font (DejaVuSerif) and font size (9) in your conky, use this command in your <code>.conkyrc</code> code: | ||
{{File|file=~/.config/conky/conky.conkyrc| | |||
content=<pre>conky.text = [[ | |||
''' | ... | ||
${font DejaVuSerif:size=9} | |||
... | |||
''' | ]]</pre> | ||
}} | |||
'''3.''' This code line displays the text "Kernel: " and the kernel you are using (using <code>$alignr</code> just yields a nicer formatting, it is not necessary: <code>$alignr</code> aligns all following text on the right of your conky): | |||
''' | {{File|file=~/.config/conky/conky.conkyrc| | ||
content=<pre>conky.text = [[ | |||
Kernel: ${alignr}${kernel} | |||
''' | ]]</pre> | ||
}} | |||
'''4.''' This variable gives you the latest 3 manjaro blog entry titles (using rss). It checks for updates every 60 minutes. | |||
{{File|file=~/.config/conky/conky.conkyrc| | |||
content=<pre>conky.text = [[ | |||
${rss http://manjaro.org/feed/ 60 item_titles 3} | |||
]]</pre> | |||
}} | |||
'''5.''' Information about the root partition <code>/</code> of your manjaro installation is displayed using | |||
{{File|file=~/.config/conky/conky.conkyrc| | |||
content=<pre>conky.text = [[ | |||
Root: ${alignr}${fs_used /} of ${fs_size /} | |||
]]</pre> | |||
}} | |||
'''6.''' Instead of example 3, you can use the following code to display the exact same information: | |||
{{File|file=~/.config/conky/conky.conkyrc| | |||
content=<pre>conky.text = [[ | |||
Kernel: ${alignr}${execi 3600 uname -r} | |||
]]</pre> | |||
}} | |||
=====execi===== | |||
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. | 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. | ||
Line 105: | Line 146: | ||
Warning: Using complicated bash commands (e.g. which call other programs or use large files) with low intervals (e.g. <code>${execi 2 XXXX}</code> runs the <code>XXXX</code> code once every 2 seconds and displays it's result in your conky) can use a lot of hardware resources and/or make your computer unresponsive. | Warning: Using complicated bash commands (e.g. which call other programs or use large files) with low intervals (e.g. <code>${execi 2 XXXX}</code> runs the <code>XXXX</code> code once every 2 seconds and displays it's result in your conky) 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 {{ic|~/.config/conky/conky.conkyrc}} file with code in it is required. Next, open a terminal and run conky pointing to the file | |||
{{UserCmd|command=conky -c ~/.config/conky/conky.conkyrc}} | |||
or to run as background daemon | |||
{{UserCmd|command=conky -d -c ~/.config/conky/conky.conkyrc}} | |||
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. The next is examples of how to run conky from your system autostart folder/file/script/command. | |||
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. | |||
<code>sleep 20</code> and <code>-p 20</code> delay the start of conky by 20 seconds after your Desktop Environment has started. Adjust this value to your liking. | <code>sleep 20</code> and <code>-p 20</code> delay the start of conky by 20 seconds after your Desktop Environment has started. Adjust this value to your liking. | ||
{{UserCmd|command=conky -c ~/.config/conky/conky.conkyrc &}} | |||
{{UserCmd|command=sleep 20 && conky -c ~/.config/conky/conky.conkyrc &}} | |||
When you change the running conky configuration file - conky will reload. But if you changed one of your dependency scripts (e.g. because you changed a variable and want to see the consequences) you will have to reload conky | |||
{{UserCmd|command=killall conky && conky -c ~/.config/config/conky.conkyrc}} | |||
==Troubleshooting & Tips== | |||
=Troubleshooting & Tips | |||
===Missing rings=== | |||
To be able to use LUA scripts to execute drawing functions like clock rings - you will a conky package compiled with LUA support. Either build the package the package {{ic|conky-lua}} from [[Arch_User_Repository|AUR]] or install the {{ic|conky-lua-nv}} from the official repo. | |||
==Missing network information== | ==Missing network information== | ||
If network information is missing like download speed or network name (SSID), you need to replace the network interfaces in the configuration file with your network interface name. To get the names of your interfaces - open a terminal and execute | |||
{{UserCmd|command=ip a | grep ' state UP' | cut -d' ' -f2 | cut -d':' -f1}} | |||
Use the output from the command. Interface names starting with <code>en</code> is ethernet interface and names starting with <code>wl</code> is wireless interfaces. Replace all network interfaces names with (e.g. <code>wlan0</code>, <code>eth0</code>) in your <code>.conkyrc</code> text section with the interface name(s) you retrieved from the above command. | |||
==Conky Manager== | |||
An application named Conky manager exist but has not been updated for years and the configurations found in the package may work or they may not. You may install it - it can be a used as an inspiration but you should not rely on it. If you still think you it is a must have - you can install Conky Manager build the package {{ic|conky-manager}} from [[Arch_User_Repository|AUR]] | |||
{{UserCmd|command=pamac build conky-manager}} | |||
= | |||
==See Also== | |||
=See Also= | |||
* The [https://github.com/brndnmtthws/conky/wiki Conky website] | * The [https://github.com/brndnmtthws/conky/wiki Conky website] | ||
* The [https://wiki.archlinux.org/index.php/conky Arch Wiki] page for Conky | * The [https://wiki.archlinux.org/index.php/conky Arch Wiki] page for Conky | ||
[[Category:Contents Page]] | [[Category:Contents Page]] |