Difference between revisions of "Basic Tips for conky"

fix missing lua semantics
(fix missing lua semantics)
Line 1: Line 1:
__TOC__
__TOC__
==Installation==
==Installation==
Conky can be installed with this command:
Conky can be installed using the package manager
{{UserCmd|command=pamac install conky}}
{{UserCmd|command=pamac install conky}}


Line 13: Line 13:
Then copy the default to home
Then copy the default to home
{{UserCmd|command=cp /usr/share/doc/conky-1.11.5_pre/conky.conf ~/.config/conky/conky.conkyrc}}
{{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
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


Line 20: Line 19:


===Conky configuration===
===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 brackets like this
 
The whole configuration belong between these two accolade:
{{File|file=~/.config/conky/conky.conkyrc|
{{File|file=~/.config/conky/conky.conkyrc|
content=<pre>conky.config = {
content=<pre>conky.config = {
}
};</pre>
</pre>
}}
}}
Some rules to respect:
Some rules apply


* Every line end with <code>,</code>
* Every line end with <code>,</code>
Line 42: Line 38:
     color1 = '0ab1ff',          -- Light blue
     color1 = '0ab1ff',          -- Light blue
...
...
}
};</pre>
</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):
Line 52: Line 47:
     font = 'LiberationMono:bold:size=8',
     font = 'LiberationMono:bold:size=8',
...
...
}
};</pre>
</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:
Line 63: Line 57:
     gap_y 20,                    -- and a vertical gap of 20 pixels (to your top screen edge).
     gap_y 20,                    -- and a vertical gap of 20 pixels (to your top screen edge).
...
...
}
};</pre>
</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:
Line 72: Line 65:
     own_window_hints = 'undecorated,sticky,skip_taskbar,skip_pager,below',
     own_window_hints = 'undecorated,sticky,skip_taskbar,skip_pager,below',
...
...
}
};</pre>
</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.
Line 84: Line 76:
{{File|file=~/.config/conky/conky.conkyrc|
{{File|file=~/.config/conky/conky.conkyrc|
content=<pre>conky.text = [[
content=<pre>conky.text = [[
]]</pre>
]];</pre>
}}
}}


Line 95: Line 87:
${color1}
${color1}
...
...
]]</pre>
]];</pre>
}}
}}


Line 106: Line 98:
$font
$font
...
...
]]</pre>
]];</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:
Line 114: Line 106:
${font DejaVuSerif:size=9}
${font DejaVuSerif:size=9}
...
...
]]</pre>
]];</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):
'''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):
Line 120: Line 112:
content=<pre>conky.text = [[
content=<pre>conky.text = [[
Kernel: ${alignr}${kernel}
Kernel: ${alignr}${kernel}
]]</pre>
]];</pre>
}}
}}
'''4.''' This variable gives you the latest 3 manjaro blog entry titles (using rss). It checks for updates every 60 minutes.
'''4.''' This variable gives you the latest 3 manjaro blog entry titles (using rss). It checks for updates every 60 minutes.
Line 126: Line 118:
content=<pre>conky.text = [[
content=<pre>conky.text = [[
${rss http://manjaro.org/feed/ 60 item_titles 3}
${rss http://manjaro.org/feed/ 60 item_titles 3}
]]</pre>
]];</pre>
}}
}}
'''5.''' Information about the root partition <code>/</code> of your manjaro installation is displayed using
'''5.''' Information about the root partition <code>/</code> of your manjaro installation is displayed using
Line 132: Line 124:
content=<pre>conky.text = [[
content=<pre>conky.text = [[
Root: ${alignr}${fs_used /} of ${fs_size /}
Root: ${alignr}${fs_used /} of ${fs_size /}
]]</pre>
]];</pre>
}}
}}
'''6.''' Instead of example 3, you can use the following code to display the exact same information:
'''6.''' Instead of example 3, you can use the following code to display the exact same information:
Line 138: Line 130:
content=<pre>conky.text = [[
content=<pre>conky.text = [[
Kernel: ${alignr}${execi 3600 uname -r}
Kernel: ${alignr}${execi 3600 uname -r}
]]</pre>
]];</pre>
}}
}}
=====execi=====
=====execi=====
Moderators, translator
424

edits