Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-10-14 13:59:26

jlfh0816
Member
Registered: 2022-10-05
Posts: 16

[ SOLVED ] modify genmon-label by command line

Hello
Is there a possibility to change the genmon-label by command line in a terminal or from a script?
For example, is it possible to display the content of a variable (text only) in the label?

Or can the modification only be done through the genmon control panel (label)?

thank you very much in advance! smile

Last edited by jlfh0816 (2022-10-16 14:50:45)

Offline

#2 2022-10-14 16:00:29

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: [ SOLVED ] modify genmon-label by command line

Currently it is not possible. It must be done through the configuration dialog. However, you could disable the label and include it as part of your output into the text area.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2022-10-14 16:40:10

jlfh0816
Member
Registered: 2022-10-05
Posts: 16

Re: [ SOLVED ] modify genmon-label by command line

Hello ToZ
Thank you very much for your answer!
However, I don't understand when you say:

ToZ wrote:

However, you could disable the label and include it as part of your output into the text area.

Could you give me a small example?
What the text area are you talking about?

Offline

#4 2022-10-14 17:37:57

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: [ SOLVED ] modify genmon-label by command line

Sure. Uncheck the label and add your label text inside the "<txt> </txt>" tags.

Assuming the genmon plugin is setup such that the label is "Speed" and the output of the script is 50Mbps, then:

SPEED="50Mbps"
echo "<txt>Speed: $SPEED</txt>

This way you can change the label "Speed" whenever you want.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2022-10-16 12:48:11

jlfh0816
Member
Registered: 2022-10-05
Posts: 16

Re: [ SOLVED ] modify genmon-label by command line

Hello ToZ
Sorry for my late response.
Thank you very much for the example that you provide me and which is clear and didactic.

Is there a possibility to position the text area to the left of the icon?
In the text area, is it possible to use /n to wrap lines and therefore display two lines of text?

Offline

#6 2022-10-16 14:33:46

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: [ SOLVED ] modify genmon-label by command line

jlfh0816 wrote:

Is there a possibility to position the text area to the left of the icon?

Unfortunately. no.

In the text area, is it possible to use /n to wrap lines and therefore display two lines of text?

Yes. Example:

echo "<txt>Hello"
echo "There</txt>"

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2022-10-16 14:49:40

jlfh0816
Member
Registered: 2022-10-05
Posts: 16

Re: [ SOLVED ] modify genmon-label by command line

Excellent!
Many thanks for your reply ToZ.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.039 seconds, 10 queries executed - Memory usage: 536.97 KiB (Peak: 538.25 KiB) ]