Manjaro Difference between revisions of "Basic Tips for conky/es"

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

From Manjaro
(Created page with "===Texto en Conky=== La segunda parte tiene el código conky mostrado. Cada linea de código corresponde a una linea mostrada en tu pantalla. Hay mucho disponible para modific...")
Tags: Mobile web edit Mobile edit
(Created page with "Cada variable esta marcada con un signo del dolar <code>$</code> y entre corchetes <code{}</code> (Apenas necesario si la variable contiene mas de una palabra).")
Tags: Mobile web edit Mobile edit
Line 68: Line 68:
{{BoxInfo|Las lineas en el "conky.text" la sección es mostrada exactamente como esta. Ejemplo: Si creas una linea vacía entre las secciones - conky mostrara en la pantalla una linea vacia.}}
{{BoxInfo|Las lineas en el "conky.text" la sección es mostrada exactamente como esta. Ejemplo: Si creas una linea vacía entre las secciones - conky mostrara en la pantalla una linea vacia.}}


<div lang="en" dir="ltr" class="mw-content-ltr">
Todo el código esta incluido entre estos dos corchetes:  
The whole code belong between these two double bracket:
{{File|file=~/.config/conky/conky.conf|
{{File|file=~/.config/conky/conky.conf|
content=<pre>conky.text = [[
content=<preconky.text = [[
]];</pre>
]];</pre>
}}
}}
===Examples===
===Ejemplos===
'''1.''' You can choose the color of your font using one of the following variables:
"1." Puwedes elegir diferentes fuentes con las siguiendo estas variables:
{{File|file=~/.config/conky/conky.conf|
{{File|file=~/.config/conky/conky.conf|
content=<pre>conky.text = [[
content=<pre>conky.text = [[
Line 84: Line 83:
]];</pre>
]];</pre>
}}
}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
Cada variable esta marcada con un signo del dolar <code>$</code> y entre corchetes <code{}</code> (Apenas necesario si la variable contiene mas de una palabra).
Every variable is marked with a <code>$</code> sign and by <code>{ }</code> brackets (only needed, if the variable contains more than one word).
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">

Revision as of 23:42, 20 January 2024

Other languages:
Deutsch • ‎English • ‎Türkçe • ‎español • ‎français • ‎português do Brasil • ‎русский • ‎فارسی

Instalación

Conky puede ser instalado usando el gestor de paquetes tanto Pacman como Pamac

user $ pamac install conky COPY TO CLIPBOARD


o

user $ sudo pacman -Syu conky COPY TO CLIPBOARD


Configuración

Todos los nombres de archivos que comiencen con punto . son archivos ocultos en tu administrador de archivos. necesitas hacerlos visibles. En la mayoría de los administradores estará una opción disponible.

Archivo de configuración

El archivo de configuración por defecto esta ubicado en /usr/share/doc/conky-1.11.5_pre/conky.conf en cual las versiones pueden estar sujetas a cambios. Conky no crea una carpeta local por lo que tendrás que crearla ya con anterioridad

user $ mkdir -p ~/.config/conky COPY TO CLIPBOARD


Luego copia los valores por defecto en la carpeta home

user $ cp /usr/share/doc/conky-1.11.5_pre/conky.conf ~/.config/conky/conky.conf COPY TO CLIPBOARD


El archivo de configuración es un archivo en texto simple y el contenido esta escrito usando [|LUA syntax] y esta divido en dos partes

  • Configuración
  • Texto

Configuración de Conky

La primera parte superior contiene todos los ajustes de configuraciones para todo Conky. Cosas como la posición del Conky en tu pantalla, ajustes de transparencia, ajustes de bordes, los tamaños por defecto de las fuentes, y con que frecuencia sera actualizado Conky. Toda la configuración esta dentro de un paréntesis como este.

~/.config/conky/conky.conf
conky.config = {
};

Se aplican algunas reglas

  • Todas las lineas terminan con ,
  • El valor no numérico debe colocarse entre un '
  • Los comentarios comienzan con --

Ejemplos

1 Este esta como el color blanco por defecto en conky. Adicionalmente, un color1 se configura usando Html Color Code para un azul claro.

~/.config/conky/conky.conf = {

...

 default_color = 'white',    -- Color blanco por defecto
 color1 = '0ab1ff',          -- Azul claro

...

};
{{{content}}}

2 Estas conexiones Xft, estan por defecto con la fuente (LiberationMono), crea una Bold y configúrala en el tamaño (8):

~/.config/conky/conky.conf
conky.config = {
...
};

3 Para la posición del Conky en tu pantalla, modifica estas configuraciones:

~/.config/conky/conky.conf
conky.config = {
...
  alignment = 'top_right',    -- Conky esta localizado en la parte superior derecha de tu pantalla
  gap_x 18,                   -- Se coloca un espacio horizontal de 18 pixeles (en el borde derecho de la pantalla)
  gap_y 20,                   -- Y un espacio horizontal de 20 pixeles (en el borde superior de la pantalla)
...
};

4 En caso de que tengas múltiples valores para una sola configuración, tendrás que sepáralos con una coma:

~/.config/conky/conky.conf
conky.config = {
...
   own_window_hints = 'undecorated,sticky,skip_taskbar,skip_pager,below',
...
};

Usar el comando: man conky, y busca dentro de CONFIGURATION SETTINGS para ver mas configuraciones disponibles.

Texto en Conky

La segunda parte tiene el código conky mostrado. Cada linea de código corresponde a una linea mostrada en tu pantalla. Hay mucho disponible para modificar y editar todo tipo de informació. Usa el comando: man conky, y mira dentro de "OBJECTS/VARIABLES" sección que tiene todos los objetos/variables disponibles.

Las lineas en el "conky.text" la sección es mostrada exactamente como esta. Ejemplo: Si creas una linea vacía entre las secciones - conky mostrara en la pantalla una linea vacia.
{{{2}}}

Todo el código esta incluido entre estos dos corchetes:

~/.config/conky/conky.conf
<preconky.text = [[ ]];

Ejemplos

"1." Puwedes elegir diferentes fuentes con las siguiendo estas variables:

~/.config/conky/conky.conf
conky.text = [[
...
${color}
${color1}
...
]];

Cada variable esta marcada con un signo del dolar $ y entre corchetes <code{} (Apenas necesario si la variable contiene mas de una palabra).

2. You can call the default font (and it's size) with this command:

~/.config/conky/conky.conf
conky.text = [[
...
$font
...
]];

If you want a different font (DejaVuSerif) and font size (9) in your conky, use this command in your .conf code:

~/.config/conky/conky.conf
conky.text = [[
...
${font DejaVuSerif:size=9}
...
]];

3. This code line displays the text "Kernel: " and the kernel you are using (using $alignr just yields a nicer formatting, it is not necessary: $alignr aligns all following text on the right of your conky):

~/.config/conky/conky.conf
conky.text = [[
Kernel: ${alignr}${kernel}
]];

4. This variable gives you the latest 3 manjaro blog entry titles (using rss). It checks for updates every 60 minutes.

~/.config/conky/conky.conf
conky.text = [[
${rss http://manjaro.org/feed/ 60 item_titles 3}
]];

5. Information about the root partition / of your manjaro installation is displayed using

~/.config/conky/conky.conf
conky.text = [[
Root: ${alignr}${fs_used /} of ${fs_size /}
]];

6. Instead of example 3, you can use the following code to display the exact same information:

~/.config/conky/conky.conf
conky.text = [[
Kernel: ${alignr}${execi 3600 uname -r}
]];

execi

The variable ${execi 3600 XXXX} runs the XXXX bash code in your terminal every 3600 seconds and displays the result in your conky. The result of the uname -r bash command is your currently used kernel name.

Use any bash command instead of XXXX you can think of. The bash commands can be as long and complicated as you want.

Warning
Using complicated bash commands (e.g. which call other programs or use large files) with low intervals (e.g. ${execi 2 XXXX} runs the XXXX 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 ~/.config/conky/conky.conf file with code in it is required. Next, open a terminal and run conky pointing to the file

user $ conky -c ~/.config/conky/conky.conf COPY TO CLIPBOARD

or to run as background daemon

user $ conky -d -c ~/.config/conky/conky.conf COPY TO CLIPBOARD


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. sleep 20 and -p 20 delay the start of conky by 20 seconds after your Desktop Environment has started. Adjust this value to your liking.

user $ conky -c ~/.config/conky/conky.conf & COPY TO CLIPBOARD

user $ sleep 20 && conky -c ~/.config/conky/conky.conf & COPY TO CLIPBOARD


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

user $ killall conky && conky -c ~/.config/config/conky.conf COPY TO CLIPBOARD

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 conky-lua from AUR or install the conky-lua-nv from the official repo.

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

user $ ip a COPY TO CLIPBOARD

Use the output from the command. Interface names starting with en is ethernet interface and names starting with wl is wireless interfaces. Replace all network interfaces names with (e.g. wlan0, eth0) in your .conf 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 build the package conky-manager using AUR

user $ pamac build conky-manager COPY TO CLIPBOARD

See Also

Cookies help us deliver our services. By using our services, you agree to our use of cookies.