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

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 5: Line 5:
{{UserCmd|command=pamac install conky}}
{{UserCmd|command=pamac install conky}}


<div class="mw-translate-fuzzy">
===پیکربندی===
===پیکربندی===
همه‌ی فایل هایی که نامشان با نقطه <code>.</code> شروع می‌شوند، فایل‌های مخفی هستند. اگر می خواهید فایل‌های مخفی را در مدیر پرونده خود مشاهده کنید، باید آنها را قابل مشاهده کنید. در اکثر مدیر پرونده‌ها این در گزینه ها موجود خواهد بود.
همه‌ی فایل هایی که نامشان با نقطه <code>.</code> شروع می‌شوند، فایل‌های مخفی هستند. اگر می خواهید فایل‌های مخفی را در مدیر پرونده خود مشاهده کنید، باید آنها را قابل مشاهده کنید. در اکثر مدیر پرونده‌ها این در گزینه ها موجود خواهد بود.
Line 16: Line 17:
{{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}}
فایل پیکربندی یک فایل متنی ساده است که محتوای آن با استفاده از '''[https://www.lua.org| لوآ]''' نوشته شده است و به دو بخش تقسیم می شود.
فایل پیکربندی یک فایل متنی ساده است که محتوای آن با استفاده از '''[https://www.lua.org| لوآ]''' نوشته شده است و به دو بخش تقسیم می شود.
</div>


* پیکربندی
* پیکربندی
* متن
* متن


<div class="mw-translate-fuzzy">
===پیکربندی کانکی===
===پیکربندی کانکی===
قسمت اول/بالا شامل تمام تنظیمات پیکربندی برای کل کانکی است. مواردی مانند موقعیت کانکی روی صفحه، تنظیمات شفافیت، تنظیمات حاشیه، فونت پیش‌فرض و اندازه آن، و تعداد دفعات به‌روزرسانی مخزن شما. کل پیکربندی بین براکت هایی مانند این تعلق دارد
قسمت اول/بالا شامل تمام تنظیمات پیکربندی برای کل کانکی است. مواردی مانند موقعیت کانکی روی صفحه، تنظیمات شفافیت، تنظیمات حاشیه، فونت پیش‌فرض و اندازه آن، و تعداد دفعات به‌روزرسانی مخزن شما. کل پیکربندی بین براکت هایی مانند این تعلق دارد
{{File|file=~/.config/conky/conky.conkyrc| content=<pre>conky.config = { };</pre>}}
{{File|file=~/.config/conky/conky.conkyrc| content=<pre>conky.config = { };</pre>}}
برخی از قوانین باید رعایت شوند :
برخی از قوانین باید رعایت شوند :
</div>


<div class="mw-translate-fuzzy">
* هر خط با <code>,</code> پایان می‌یابد
* هر خط با <code>,</code> پایان می‌یابد
* مقدار غیرعددی باید بین <code>'</code> قرار گیرد
* مقدار غیرعددی باید بین <code>'</code> قرار گیرد
Line 49: Line 54:
{{File|file=~/.config/conky/conky.conkyrc| content=<pre>conky.config = { ... own_window_hints = 'undecorated,sticky,skip_taskbar,skip_pager,below', ... };</pre> }}
{{File|file=~/.config/conky/conky.conkyrc| content=<pre>conky.config = { ... own_window_hints = 'undecorated,sticky,skip_taskbar,skip_pager,below', ... };</pre> }}
از دستور <code>man conky</code> استفاده کنید و به بخش '''CONFIGURATION SETTINGS''' نگاه کنید تا همه تنظیمات موجود را ببینید.
از دستور <code>man conky</code> استفاده کنید و به بخش '''CONFIGURATION SETTINGS''' نگاه کنید تا همه تنظیمات موجود را ببینید.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Line 58: Line 64:
<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.conkyrc|
{{File|file=~/.config/conky/conky.conf|
content=<pre>conky.text = [[
content=<pre>conky.text = [[
]];</pre>
]];</pre>
Line 64: Line 70:
===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 80: Line 86:
<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.conkyrc|
{{File|file=~/.config/conky/conky.conf|
content=<pre>conky.text = [[
content=<pre>conky.text = [[
...
...
Line 87: Line 93:
]];</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 96: Line 102:
}}
}}
'''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 102: Line 108:
}}
}}
'''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 108: Line 114:
}}
}}
'''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 114: Line 120:
}}
}}
'''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 136: Line 142:
<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.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}}
</div>
</div>


Line 148: Line 154:


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


Line 171: Line 177:
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.
</div>
</div>


8,138

edits