8,560
edits
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
Line 5: | Line 5: | ||
{{UserCmd|command=pamac install conky}} | {{UserCmd|command=pamac install conky}} | ||
<div class="mw-translate-fuzzy"> | |||
===Configuration=== | ===Configuration=== | ||
Tout fichier ayant un nom commençant par un point <code>.</code> est un fichier caché. Si vous voulez voir ces fichiers, il faudra les rendre visible, en activant l'option le permettant dans votre explorateur de fichier (ce qui peut être fait avec Ctrl+h dans certains). | Tout fichier ayant un nom commençant par un point <code>.</code> est un fichier caché. Si vous voulez voir ces fichiers, il faudra les rendre visible, en activant l'option le permettant dans votre explorateur de fichier (ce qui peut être fait avec Ctrl+h dans certains). | ||
Line 14: | Line 15: | ||
{{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}} | ||
Ce fichier est un bête document texte respectant la [[https://www.lua.org/ |syntaxe LUA]], et possède la propriété d'être découpé en deux parties bien distinctes | Ce fichier est un bête document texte respectant la [[https://www.lua.org/ |syntaxe LUA]], et possède la propriété d'être découpé en deux parties bien distinctes | ||
</div> | |||
* La configuration | * La configuration | ||
* Du texte | * Du texte | ||
<div class="mw-translate-fuzzy"> | |||
===Configuration de Conky=== | ===Configuration de Conky=== | ||
La partie la plus haute contient tous les éléments nécessaires à la configuration de conky, par exemple la position sur l'écran, la transparence, la gestion des bords, la fréquence de rafraîchissement ou encore la gestion de la police. Toutes les règles de configuration se trouvent alors dans des accolades comme ci-dessous | La partie la plus haute contient tous les éléments nécessaires à la configuration de conky, par exemple la position sur l'écran, la transparence, la gestion des bords, la fréquence de rafraîchissement ou encore la gestion de la police. Toutes les règles de configuration se trouvent alors dans des accolades comme ci-dessous | ||
Line 24: | Line 27: | ||
};</pre> | };</pre> | ||
Il y a cependant quelques règles | Il y a cependant quelques règles | ||
</div> | |||
<div class="mw-translate-fuzzy"> | |||
* Chaque ligne doit finir par <code>,</code> | * Chaque ligne doit finir par <code>,</code> | ||
* Les valeurs qui ne sont ni des nombres ni des booléens (True/False) doivent être placé entre guillemets <code>'</code> | * Les valeurs qui ne sont ni des nombres ni des booléens (True/False) doivent être placé entre guillemets <code>'</code> | ||
Line 67: | Line 72: | ||
}} | }} | ||
On le répétera jamais assez, mais le manuel est votre meilleur allié : <code>man conky</code>, jetez un œil sous '''CONFIGURATION SETTINGS''' pour voir toutes les options disponibles. | On le répétera jamais assez, mais le manuel est votre meilleur allié : <code>man conky</code>, jetez un œil sous '''CONFIGURATION SETTINGS''' pour voir toutes les options disponibles. | ||
</div> | |||
===Texte affiché par Conky=== | ===Texte affiché par Conky=== | ||
Line 74: | Line 80: | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
The whole code belong between these two double bracket: | The whole code belong between these two double bracket: | ||
{{File|file=~/.config/conky/conky. | {{File|file=~/.config/conky/conky.conf| | ||
content=<pre>conky.text = [[ | content=<pre>conky.text = [[ | ||
]];</pre> | ]];</pre> | ||
Line 80: | Line 86: | ||
===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. | {{File|file=~/.config/conky/conky.conf| | ||
content=<pre>conky.text = [[ | content=<pre>conky.text = [[ | ||
... | ... | ||
Line 96: | Line 102: | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
'''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. | {{File|file=~/.config/conky/conky.conf| | ||
content=<pre>conky.text = [[ | content=<pre>conky.text = [[ | ||
... | ... | ||
Line 103: | Line 109: | ||
]];</pre> | ]];</pre> | ||
}} | }} | ||
If you want a different font (DejaVuSerif) and font size (9) in your conky, use this command in your <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. | {{File|file=~/.config/conky/conky.conf| | ||
content=<pre>conky.text = [[ | content=<pre>conky.text = [[ | ||
... | ... | ||
Line 112: | Line 118: | ||
}} | }} | ||
'''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. | {{File|file=~/.config/conky/conky.conf| | ||
content=<pre>conky.text = [[ | content=<pre>conky.text = [[ | ||
Kernel: ${alignr}${kernel} | Kernel: ${alignr}${kernel} | ||
Line 118: | Line 124: | ||
}} | }} | ||
'''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. | {{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 124: | Line 130: | ||
}} | }} | ||
'''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. | {{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 130: | Line 136: | ||
}} | }} | ||
'''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. | {{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 152: | Line 158: | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
===Running conky=== | ===Running conky=== | ||
If you want to display a conky on your desktop a {{ic|~/.config/conky/conky. | 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. | {{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. | {{UserCmd|command=conky -d -c ~/.config/conky/conky.conf}} | ||
</div> | </div> | ||
Line 164: | Line 170: | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
{{UserCmd|command=conky -c ~/.config/conky/conky. | {{UserCmd|command=conky -c ~/.config/conky/conky.conf &}} | ||
{{UserCmd|command=sleep 20 && conky -c ~/.config/conky/conky. | {{UserCmd|command=sleep 20 && conky -c ~/.config/conky/conky.conf &}} | ||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
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. | {{UserCmd|command=killall conky && conky -c ~/.config/config/conky.conf}} | ||
</div> | </div> | ||
Line 189: | Line 195: | ||
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>. | 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. | ||
</div> | </div> | ||