Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-10-21 07:26:10

rammyk
Member
Registered: 2025-10-21
Posts: 7
LinuxFirefox 143.0

How to make genmon styling work?

Hello folks. I wanted to add a couple genmon scripts, i.e. https://docs.xfce.org/panel-plugins/xfc … ugin/start and found https://github.com/xfce-mirror/xfce4-ge … tyling.txt which shows convention and have been using this example script: https://github.com/levimake/xfce4-genmo … /memory.sh. The icon & the output text is shown correctly but the style from <css> tag doesn't seem to be applied. Interestingly if I have a span tag in between the <txt> tag like so: <span fgcolor='White' bgcolor='Red'> borrowed from https://github.com/xtonousou/xfce4-genm … el.sh#L139 the span is correctly styled, but I'm not sure what values does txt accept. Also there exists no such element 'txt' in html and I searched gtk documentation too but couldn't find much. Help!

Offline

#2 2025-10-21 09:54:00

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,309
LinuxFirefox 144.0

Re: How to make genmon styling work?

Hello and welcome.

What version of xfce4-genmon-plugin are you running? CSS Styling was added in 4.0.1. The <span> tag comes from Pango Markup which is natively supported.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2025-10-21 13:47:25

rammyk
Member
Registered: 2025-10-21
Posts: 7
LinuxFirefox 143.0

Re: How to make genmon styling work?

ToZ wrote:

Hello and welcome.

What version of xfce4-genmon-plugin are you running? CSS Styling was added in 4.0.1. The <span> tag comes from Pango Markup which is natively supported.

Hi there!
I'm running 4.1.1. Here is the full script: https://filebin.net/3p7nmwa4a2qapxhc. pango markup is interesting, thanks for the context. I'm aiming for background colors based on this https://github.com/levimake/xfce4-genmo … /tree/main but there's not a lot of documentation on this. Any help on this would be appreciated.

Offline

#4 2025-10-21 15:01:45

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,309
LinuxFirefox 143.0

Re: How to make genmon styling work?

Sorry, my bad. The <css> styling tag was added in version 4.2.0 (it was the css style classes that were added in 4.0.1). Prior to that you would need to include directives into ~/.config/gtk-3.0/gtk.css. If you are unable to upgrade, you'll need to take the CSS out of there and put it into ~/.config/gtk-3.0/gtk.css. When doing that, you should also prefix each directive with the plugin ID (which you can get while hovering over the plugin entry at Panel Preferences > Items tab) so you can target individual instances of the plugin. So assuming "#genmon-10" as the plugin ID:

#genmon-10 .genmon_value {
      background-color: #835077;
      color:#000000;
      padding-left:10px;
      padding-right:10px;
    }
#genmon-10 .genmon_label {color:green}

Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2025-10-22 04:53:32

rammyk
Member
Registered: 2025-10-21
Posts: 7
LinuxFirefox 144.0

Re: How to make genmon styling work?

Thanks ToZ. I added gtk.css in .config/gtk-3.0, gave it execute permission but still no dice. Tried replacing .genmon_value to .genmon_plugin as well per documentation but doesn't work.
Here is my gtk.css

#genmon-16 .genmon_value {
    background-color:red;
    color:black;
    padding-left:10px;
    padding-right:10px;
}

Script is everything removed after line 48 from https://github.com/levimake/xfce4-genmo … /memory.sh.
I even tried to install the latest version 4.3.0 from https://archive.xfce.org/src/panel-plug … lugin/4.3/ by following steps in extracted tars README and there was no error, however the version still seems to be 4.1.1. Not sure what's going on  hmm . It'd be nice to see if any logs are being emitted when reading the css file.

Added later 50 min 30 s:
Another question I have is the way I installed genmon plugin is through Software Sources application. In here the latest version is 4.1.1 and it's the same through apt as well but from official website 4.3.0 is the latest. Is there a way to let software manager know about latest version?

Offline

#6 2025-10-22 10:29:45

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,309
LinuxFirefox 144.0

Re: How to make genmon styling work?

You don't need to make ~/.config/gtk-3.0/gtk.css executable. Can you post back:

ls -l ~/.config/gtk-3.0

Did you restart the panel or log out and back in again?

Which distro are you running?

Can you post back the complete contents of the memory.sh script that you're using?

As for installing another version of the program, can you post back the commands you used to build it? You're distro controls which versions are available via the software manager.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2025-10-22 11:15:59

rammyk
Member
Registered: 2025-10-21
Posts: 7
LinuxFirefox 144.0

Re: How to make genmon styling work?

ToZ wrote:

You don't need to make ~/.config/gtk-3.0/gtk.css executable. Can you post back:

ls -l ~/.config/gtk-3.0

Did you restart the panel or log out and back in again?

Which distro are you running?

Can you post back the complete contents of the memory.sh script that you're using?

As for installing another version of the program, can you post back the commands you used to build it? You're distro controls which versions are available via the software manager.

Yay, it works!
https://ibb.co/TDZK7Bkp

Restarting the panel using `xfce4-panel --restart` worked. I may have messed some steps up during restarting my machine earlier. Thank you very much!
XFCE FTW! 🙌

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.010 seconds, 7 queries executed - Memory usage: 574.55 KiB (Peak: 591.4 KiB) ]