Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-10-05 14:42:10

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

[ SOLVED ] customizing genmon tooltip using gtk.css file

Hello
I'm very interested in customizing GenMon using the gtk.css file
I know there are already a few ways to customize the part of GenMon that is displayed in the xfce4 panel (genmon-value or genmon-imagebutton for example). However, I don't know if there is a way to customize GenMon's tooltip?
I only know that one can change the tooltips of all GenMon instances enabled in the XFCE4 panel but this also affects all the tooltips of other applications displayed in the XFCE4 panel.
Is there a way to customize just the tooltip for a particular instance of GenMon?
Many thanks in advance for your response!  smile

post scriptum: my system is Xubuntu 22.04

Last edited by jlfh0816 (2022-10-14 14:15:42)

Offline

#2 2022-10-05 15:13:07

CwF
Member
Registered: 2018-01-28
Posts: 305

Re: [ SOLVED ] customizing genmon tooltip using gtk.css file

There is support for pango markup which can be embedded in each individually.

Search for examples on here, I'm not very fluent.

Last edited by CwF (2022-10-05 15:14:45)

Offline

#3 2022-10-05 16:09:25

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

Re: [ SOLVED ] customizing genmon tooltip using gtk.css file

Thank you very much CwF for this quick response!

I know the Pango language and I use it but unless I am mistaken it cannot be used in the gtk.css file but only between span tags of a script run by Genmon.
To be more precise, I want to modify the background of a tooltip by adding transparency and/or an image. As Pango does not authorize this possibility, I intended to do it thanks to the CSS styling properties (background-image for example).

Offline

#4 2022-10-05 19:08:58

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

Re: [ SOLVED ] customizing genmon tooltip using gtk.css file

Modifying the background of a tooltip, although possible, is not currently possible on a per-element basis. Meaning, if you do add a tweak to gtk.css, it will affect all tooltips. This is a limitation of GTK3.


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-06 08:38:00

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

Re: [ SOLVED ] customizing genmon tooltip using gtk.css file

Thank you very much ToZ for your reply.
Indeed, in the various tests that I carried out to modify the background of the tooltips, it works in Genmon but it also affects all the other tooltips of the other applications displayed in the XFCE4 panel.

Can you allow me two more questions?

First, is there an exhaustive list of all Genmon properties that one can customize in a gtk.css file?
I only know the ones described on this link.
As for the ones described on this other link, I can't figure out which ones are applicable to Genmon.

And, second question, since the Pango markup language does not support images, is there a possibility to create themes for tooltips, a bit like creating themes for xfce-notify-4.0?

Please excuse me for all these questions and forgive me in advance if they do not seem relevant to you.
Thanks again!  smile

Last edited by jlfh0816 (2022-10-06 08:39:28)

Offline

#6 2022-10-06 10:38:24

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

Re: [ SOLVED ] customizing genmon tooltip using gtk.css file

jlfh0816 wrote:

First, is there an exhaustive list of all Genmon properties that one can customize in a gtk.css file?

The exhaustive list is actually all supported GTK3 elements/properties.

I only know the ones described on this link.
As for the ones described on this other link, I can't figure out which ones are applicable to Genmon.

The first link lists the element names that you can directly target to make it easier to get at those elements. Basically, if its supported in GTK3, it will be supported with the genmon plugin.

And, second question, since the Pango markup language does not support images, is there a possibility to create themes for tooltips, a bit like creating themes for xfce-notify-4.0?

Yes - in the same way that you create themes for other elements. Use "tooltip" as the widget name and add any directives to it. For example, a background image:

tooltip {background-image: url("file:///home/toz/back.png")}

The text in the tooltip:

tooltip label {color: red}

A bunch of tweaks to adjust shape:

tooltip {
  padding: 15px 15px 15px 15px;
  margin: 0px 0px 0px 0px;
    border-width: 1px;
    border-style: solid;
    border-radius: 100px;
    border-color: #0000ff;
    color: #232323;
    border: 0px;
}

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-06 12:13:20

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

Re: [ SOLVED ] customizing genmon tooltip using gtk.css file

Thank you very much ToZ for these clear and detailed explanations.
And I take advantage of this exchange to thank you for all the work you do around Genmon! big_smile

Offline

#8 2022-10-06 12:26:53

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

Re: [ SOLVED ] customizing genmon tooltip using gtk.css file

jlfh0816 wrote:

And I take advantage of this exchange to thank you for all the work you do around Genmon! big_smile

It really is a cool little utility. For the next release its going to support css tags in the command box and will be migrated to xfconf for the backend (added benefit is that it will be saved in panel profiles and allow for easy switching of panel configurations).


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

#9 2022-10-06 16:18:05

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

Re: [ SOLVED ] customizing genmon tooltip using gtk.css file

@ToZ
This is really great news and I confess that I am looking forward to the possibility of using <css> tags!
I suspect that this new development represents a lot of work but do you have an estimate of the release of this new version for all audiences?
Thank you again for your involvement and your work!  big_smile

Offline

#10 2022-10-06 16:25:46

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

Re: [ SOLVED ] customizing genmon tooltip using gtk.css file

It looks like Xfce 4.18 is gearing up for a Christmas release - so the next version of genmon will be released at that time. If you could run the development version it would be helpful - always looking for feedback on the upcoming enhancements.


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

#11 2022-10-10 14:39:02

CwF
Member
Registered: 2018-01-28
Posts: 305

Re: [ SOLVED ] customizing genmon tooltip using gtk.css file

Yes! I also want to extend many Thanks for genmon. It is core to my desktop.

With the panel switch functionality I assume 'heavy' genmons could be toggled 'off' and not just 'hidden'. That really opens the door for a desktop mode switch! I usually use 5+ instances. Excellent!

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.015 seconds, 8 queries executed - Memory usage: 571.19 KiB (Peak: 588.03 KiB) ]