A question about the genmon plugin

houghi houghi at houghi.org
Thu Mar 27 19:04:49 CET 2014


On Thu, Mar 27, 2014 at 11:44:31AM +0000, Chris Green wrote:
> I currently use the genmon plugin to display some text in the panel.
> 
> I currently only use the <txt>.....</txt> output but notice that there
> is now the following option:-
> 
>     <click>The command to be executed when clicking on the image</click>
> 
> Does this mean *exactly* what it says?  I.e. do I have to add an image
> to what genmon outputs (with <img>.....</img>) or is it possible to
> click on my text-only output and run a command?

Yes, it does. I have a script that looks at an mbox file to see if there
is new mail, unread mail or read mail. That will then show a transparent,
green or gold envelope. When I click on it, it will open my desired
program (mutt) with the specific mbox.

Here is the output of the file:
houghi at penne : CM lists
<img>/tmp/xfce-readmail.png</img>
<tool>lists
4 : Total
1 : Unread
0 : New</tool>
<click>/usr/local/bin/CM lists X</click>

The script gives a different image, depending on the situation:
houghi at penne : CM spool
<img>/tmp/xfce-nomail.png</img>
<tool>spool
52 : Total
0 : Unread
0 : New</tool>
<click>/usr/local/bin/CM spool X</click>

(I have 10 such genmon plugins.)
Running `CM spool X` will lauch `mutt -f ~/Mail/spool` or mutt -f
~/Mail/lists` or whatever I desire.

This also means that you can decide to launch a differnt program
depending on the outcome.

However the best way to be sure is to just try it out. ;-)

houghi
-- 
This is written under the inluence of the following:
>   Artist : Kiss
>     Song : She
>    Album : Alive!


More information about the Xfce mailing list