[Ubuntu-cat] conki OSD

Paco Rivière web a pacoriviere.cat
diu jul 14 18:33:34 UTC 2019


No ho entenc, jo no tinc cap
conky.config =
ni
conky.text =
al .conkyrc

On Sun, Jul 14, 2019 at 8:25 PM Miki <mikcat a gmail.com> wrote:

> Si, no te l'he posat pas tot, només era per indicar-te a quina secció del
> teu .conkyrc aniria.
>
> Estructura del .conkyrc:
>
> conky.config = {
> -- Aquí van totes les configs...
> };
>
> conky.text = [[
> # Aquí van els monitors...
> ]]
>
> Si estàs fent servir el format antic com aquest
> https://github.com/mrmierzejewski/conkyrc/blob/master/conkyrc
> llavors te'l defineixes així i ja està:
> lua_load ~/conky/utils.lua
> i els monitors sota de
> TEXT
>
> Salut !
> Miki
>
>
> Missatge de Paco Rivière <web a pacoriviere.cat> del dia dg., 14 de jul.
> 2019 a les 20:05:
>
>> Aqui deu faltar una clau final?
>> > conky.config = {
>>         lua_load = '~/conky/utils.lua',
>>
>> On Fri, Jul 12, 2019 at 6:12 AM Miki <mikcat a gmail.com> wrote:
>>
>>> Bon dia Paco,
>>>
>>> No et cal instal·lar res:
>>>
>>> Can be extended using built-in Lua support, or any of your own scripts
>>> and programs (more).
>>> Built-in Imlib2 and Cairo bindings for arbitrary drawing with Lua (more).
>>>
>>> Abans de respondre ho vaig estar provant per curiositat i em va
>>> funcionar així que
>>> si segueixes les instruccions que et vaig passar t'hauria d'anar bé,
>>> segons la doc:
>>>
>>> ${lua sub ${top name 1} 0 5}
>>>
>>> Crida a la funció conky_sub amb els params ${top name 1} 0 5:
>>>
>>> I dins la funció, primer avaluem l'expressió, i després li fem un
>>> substring amb els params rebuts, en l'exemple retalla els 5 primers.
>>>
>>> referències:
>>>
>>> http://conky.sourceforge.net/variables.html
>>> lua function_name (function parameters) Executes a Lua function with
>>> given parameters, then prints the returned string. See also 'lua_load' on
>>> how to load scripts. Conky puts 'conky_' in front of function_name to
>>> prevent accidental calls to the wrong function unless you put you place
>>> 'conky_' in front of it yourself.
>>>
>>> Funcions de conky disponibles als teus scripts lua que carreguis amb el
>>> lua_load:
>>> http://conky.sourceforge.net/lua.html
>>>
>>> http://lua-users.org/wiki/StringLibraryTutorial
>>> string.sub(s, i [, j]) s:sub(i [,j])
>>>
>>> Return a substring of the string passed. The substring starts at i. If
>>> the third argument j is not given, the substring will end at the end of
>>> the string. If the third argument is given, the substring ends at and
>>> includes j.
>>>
>>>
>>> Salut !
>>> Miki
>>>
>>>
>>>
>>> Missatge de Paco Rivière <web a pacoriviere.cat> del dia dj., 11 de jul.
>>> 2019 a les 18:44:
>>>
>>>> Gràcies Miki,
>>>> Això del lua no ho he provat mai. Cal instal·lar un connector O com va?
>>>>
>>>> Paco Rivière กูร ปาโกะ
>>>> http://paco.riviere.cat
>>>>
>>>> El dc., 10 de jul. 2019, 20:55, Miki <mikcat a gmail.com> va escriure:
>>>>
>>>>> Bones,
>>>>>
>>>>> No he sabut trobar la manera de cridar funcions pròpies del lua, però
>>>>> com que et pots definir scripts en pots crear un tal que:
>>>>> fitxer:  ~/conky/utils.lua
>>>>>
>>>>> function conky_sub(expr, i, j)
>>>>>         local value=conky_parse(expr)
>>>>>         return value:sub(i, j)
>>>>> end
>>>>>
>>>>> i al .conkyrc
>>>>>
>>>>> conky.config = {
>>>>>         lua_load = '~/conky/utils.lua',
>>>>> ....
>>>>>
>>>>> I al text ho pots fer servir:
>>>>>
>>>>> ${lua sub ${top name 1} 0 5}
>>>>>
>>>>> Salut !
>>>>> Miki
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Missatge de Paco Rivière <web a pacoriviere.cat> del dia dc., 10 de
>>>>> jul. 2019 a les 16:06:
>>>>>
>>>>>> Gràcies Tomàs,
>>>>>> Perfecte, més o menys com ho faig pals 'exec' per les ordres externes.
>>>>>> I amb les ordres del conki com es pot retallar el resultat?
>>>>>>
>>>>>> Paco Rivière กูร ปาโกะ
>>>>>> http://paco.riviere.cat
>>>>>>
>>>>>> El dc., 10 de jul. 2019, 15:57, Tomàs Mallafré <tomas a mallafre.cat>
>>>>>> va escriure:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Missatge de Paco Rivière <web a pacoriviere.cat> del dia dc., 10 de
>>>>>>> jul. 2019 a les 15:40:
>>>>>>>
>>>>>>>> Gràcies per la vostra ajuda. Al final m'he decidit per un Ryzen 3.
>>>>>>>> El FX ja no era disponible.
>>>>>>>> He posat al dia una mica el conki i envio una captura per si algú
>>>>>>>> l'interessa l'arxiu de configuració.
>>>>>>>>
>>>>>>>> Notes:
>>>>>>>> No sé com retallar el nom del proces.
>>>>>>>> Tampoc puc traduïr la predicció del temps, amb cut en bash, si té
>>>>>>>> un espai
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> Jo el conky el tinc com a panell a la part superior de la pantalla.
>>>>>>> No sé quin és el problema exactament però potser et serveix definir l'espai
>>>>>>> com a separador; jo per exemple perquè em mostri la versió de nucli que
>>>>>>> està corrent ho faig amb
>>>>>>>
>>>>>>> exec uname -a | cut -d' ' -f3
>>>>>>>
>>>>>>> que fa que agafi el tercer bloc de dades un cop separats els blocs
>>>>>>> per espais. Segurament el man ho explica millor que jo:
>>>>>>>
>>>>>>>  -d, --delimiter=DELIM
>>>>>>>               use DELIM instead of TAB for field delimiter
>>>>>>>
>>>>>>>        -f, --fields=LIST
>>>>>>>               select only these fields;  also print any line that
>>>>>>> contains no delimiter character, unless the -s option is specified
>>>>>>>
>>>>>>> També elimino la part que no necessito de la dreta amb
>>>>>>>
>>>>>>> cut -d'-' -f1
>>>>>>>
>>>>>>> Salut!
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Tomàs Mallafré
>>>>>>> GnuPG: 0x2D1296BA - https://z.tomi.cat/pgp
>>>>>>> Telegram: t.me/tmallafre
>>>>>>> protonmail: tmallafre a pm.me
>>>>>>>
>>>>>>> Aquest missatge no l'ha analitzat cap antivirus en origen; està
>>>>>>> enviat des d'un sistema GNU/Linux i és poc probable que contingui
>>>>>>> programari maliciós.
>>>>>>> --
>>>>>>> Ubuntu-cat mailing list
>>>>>>> Ubuntu-cat a lists.ubuntu.com
>>>>>>> Modify settings or unsubscribe at:
>>>>>>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-cat
>>>>>>>
>>>>>> --
>>>>>> Ubuntu-cat mailing list
>>>>>> Ubuntu-cat a lists.ubuntu.com
>>>>>> Modify settings or unsubscribe at:
>>>>>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-cat
>>>>>>
>>>>> --
>>>>> Ubuntu-cat mailing list
>>>>> Ubuntu-cat a lists.ubuntu.com
>>>>> Modify settings or unsubscribe at:
>>>>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-cat
>>>>>
>>>> --
>>>> Ubuntu-cat mailing list
>>>> Ubuntu-cat a lists.ubuntu.com
>>>> Modify settings or unsubscribe at:
>>>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-cat
>>>>
>>> --
>>> Ubuntu-cat mailing list
>>> Ubuntu-cat a lists.ubuntu.com
>>> Modify settings or unsubscribe at:
>>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-cat
>>>
>>
>>
>> --
>> Paco Rivière กูร ปาโกะ
>> http://paco.riviere.cat <http://pacoriviere.cat>
>> --
>> Ubuntu-cat mailing list
>> Ubuntu-cat a lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-cat
>>
> --
> Ubuntu-cat mailing list
> Ubuntu-cat a lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-cat
>


-- 
Paco Rivière กูร ปาโกะ
http://paco.riviere.cat <http://pacoriviere.cat>
-------------- part següent --------------
Un document HTML ha estat eliminat...
URL: <https://lists.ubuntu.com/archives/ubuntu-cat/attachments/20190714/24e9d82c/attachment.html>


Més informació sobre la llista de correu Ubuntu-cat