Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-08-18 04:11:29

espas
Member
Registered: 2021-09-29
Posts: 31

[SOLVED] Some questions about xfce4-genmon-plugin

I've been playing with genmon lately and I really like the tool but there are 2 things I could not figure out. I don't know if this is the right place, but couldn't find anything online.

1) Is it possible to make everything clickable? I know you can make the text clickable using <txtclick> and you can make the image/icon clickable by using <click> but even if you use both there is a gap between the two. I want to make all of it clickable like the default xfce plugins.

2) Is it possible to make it refresh on click? The only way I know to make the info refresh is to right click > properties > save but some of my genmon scripts need long periods and it would be nice if I could click on it to refresh the info but I don't know how to achieve this.

Last edited by espas (2022-08-18 19:56:15)

Offline

#2 2022-08-18 10:56:10

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

Re: [SOLVED] Some questions about xfce4-genmon-plugin

espas wrote:

1) Is it possible to make everything clickable? I know you can make the text clickable using <txtclick> and you can make the image/icon clickable by using <click> but even if you use both there is a gap between the two. I want to make all of it clickable like the default xfce plugins.

Unfortunately no. The plugin uses an eventbox and in that box elements are placed that can be made clickable. If you only put one element in (just text, or just an image/icon) then it would work as you intend.

2) Is it possible to make it refresh on click? The only way I know to make the info refresh is to right click > properties > save but some of my genmon scripts need long periods and it would be nice if I could click on it to refresh the info but I don't know how to achieve this.

You can use the plugin-event call to refresh a plugin on click. Consider the following genmon code:

#!/bin/bash

echo "<txt>$(echo $RANDOM)</txt>"
echo "<txtclick>xfce4-panel --plugin-event=genmon-4:refresh:bool:true</txtclick>"
echo "<tool>Random value</tool>"

It displays a random value, but on click, it calls the refresh plugin event to restart the cycle/period. You just need to specify the proper plugin ID (in the case above it is genmon-4) which you can get by hovering over the plugin on the Panel Properties Items tab.


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-08-18 19:55:59

espas
Member
Registered: 2021-09-29
Posts: 31

Re: [SOLVED] Some questions about xfce4-genmon-plugin

ToZ wrote:

2) Is it possible to make it refresh on click? The only way I know to make the info refresh is to right click > properties > save but some of my genmon scripts need long periods and it would be nice if I could click on it to refresh the info but I don't know how to achieve this.

You can use the plugin-event call to refresh a plugin on click. Consider the following genmon code:

#!/bin/bash

echo "<txt>$(echo $RANDOM)</txt>"
echo "<txtclick>xfce4-panel --plugin-event=genmon-4:refresh:bool:true</txtclick>"
echo "<tool>Random value</tool>"

It displays a random value, but on click, it calls the refresh plugin event to restart the cycle/period. You just need to specify the proper plugin ID (in the case above it is genmon-4) which you can get by hovering over the plugin on the Panel Properties Items tab.

It worked! Thanks.

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 529.43 KiB (Peak: 530.71 KiB) ]