Difference between revisions of "Basic Tips for conky/en"

Updating to match new version of source page
(Updating to match new version of source page)
(Updating to match new version of source page)
Tags: Mobile web edit Mobile edit
 
Line 12: Line 12:
{{UserCmd|command=mkdir -p ~/.config/conky}}
{{UserCmd|command=mkdir -p ~/.config/conky}}
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.conf}}
The configuration file is a simple text file and the content written using [[https://www.lua.org/ |LUA syntax]] and is split into two parts
The configuration 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 20:
===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 whole configuration belong between brackets like this
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
{{File|file=~/.config/conky/conky.conkyrc|
{{File|file=~/.config/conky/conky.conf|
content=<pre>conky.config = {
content=<pre>conky.config = {
};</pre>
};</pre>
Line 31: Line 31:
===Examples===
===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|
{{File|file=~/.config/conky/conky.conf|
content=<pre>conky.config = {
content=<pre>conky.config = {
...
...
Line 40: Line 40:
}}
}}
'''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|
{{File|file=~/.config/conky/conky.conf|
content=<pre>conky.config = {
content=<pre>conky.config = {
...
...
Line 49: Line 49:
}}
}}
'''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|
{{File|file=~/.config/conky/conky.conf|
content=<pre>conky.config = {
content=<pre>conky.config = {
...
...
Line 59: Line 59:
}}
}}
'''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|
{{File|file=~/.config/conky/conky.conf|
content=<pre>conky.config = {
content=<pre>conky.config = {
...
...
Line 73: Line 73:


The whole code belong between these two double bracket:
The whole code belong between these two double bracket:
{{File|file=~/.config/conky/conky.conkyrc|
{{File|file=~/.config/conky/conky.conf|
content=<pre>conky.text = [[
content=<pre>conky.text = [[
]];</pre>
]];</pre>
Line 79: Line 79:
===Examples===
===Examples===
'''1.''' You can choose the color of your font using one of the following variables:
'''1.''' You can choose the color of your font using one of the following variables:
{{File|file=~/.config/conky/conky.conkyrc|
{{File|file=~/.config/conky/conky.conf|
content=<pre>conky.text = [[
content=<pre>conky.text = [[
...
...
Line 91: Line 91:


'''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|
{{File|file=~/.config/conky/conky.conf|
content=<pre>conky.text = [[
content=<pre>conky.text = [[
...
...
Line 98: Line 98:
]];</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>.conf</code> code:
{{File|file=~/.config/conky/conky.conkyrc|
{{File|file=~/.config/conky/conky.conf|
content=<pre>conky.text = [[
content=<pre>conky.text = [[
...
...
Line 107: Line 107:
}}
}}
'''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):
{{File|file=~/.config/conky/conky.conkyrc|
{{File|file=~/.config/conky/conky.conf|
content=<pre>conky.text = [[
content=<pre>conky.text = [[
Kernel: ${alignr}${kernel}
Kernel: ${alignr}${kernel}
Line 113: Line 113:
}}
}}
'''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.
{{File|file=~/.config/conky/conky.conkyrc|
{{File|file=~/.config/conky/conky.conf|
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}
Line 119: Line 119:
}}
}}
'''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
{{File|file=~/.config/conky/conky.conkyrc|
{{File|file=~/.config/conky/conky.conf|
content=<pre>conky.text = [[
content=<pre>conky.text = [[
Root: ${alignr}${fs_used /} of ${fs_size /}
Root: ${alignr}${fs_used /} of ${fs_size /}
Line 125: Line 125:
}}
}}
'''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:
{{File|file=~/.config/conky/conky.conkyrc|
{{File|file=~/.config/conky/conky.conf|
content=<pre>conky.text = [[
content=<pre>conky.text = [[
Kernel: ${alignr}${execi 3600 uname -r}
Kernel: ${alignr}${execi 3600 uname -r}
Line 139: Line 139:


===Running conky===
===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
If you want to display a conky on your desktop a {{ic|~/.config/conky/conky.conf}} 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}}
{{UserCmd|command=conky -c ~/.config/conky/conky.conf}}
or to run as background daemon
or to run as background daemon
{{UserCmd|command=conky -d -c ~/.config/conky/conky.conkyrc}}
{{UserCmd|command=conky -d -c ~/.config/conky/conky.conf}}


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. The next is examples of how to run conky from your system autostart folder/file/script/command.
<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=conky -c ~/.config/conky/conky.conf &}}
{{UserCmd|command=sleep 20 && conky -c ~/.config/conky/conky.conkyrc &}}
{{UserCmd|command=sleep 20 && conky -c ~/.config/conky/conky.conf &}}


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
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}}
{{UserCmd|command=killall conky && conky -c ~/.config/config/conky.conf}}


===Troubleshooting & Tips===
===Troubleshooting & Tips===
Line 162: Line 162:
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
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}}
{{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.
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>.conf</code> text section with the interface name(s) you retrieved from the above command.


===Conky Manager===
===Conky Manager===
8,560

edits