Xfce Forum

Sub domains
 

You are not logged in.

#1 2017-01-23 23:23:09

rfet35
Member
Registered: 2017-01-23
Posts: 21

xfce4-genmon-plugin fixed width

The size of a genmon panel item is variable depending on the length of the <txt> field amongst others. As I load it with dynamic content the size of the plugin in-/decreases which also leads to other plugins being pushed around.

Is there a way to set the width for a genmon plugin item?
Or can I set a fixed width <txt> field with pango markup?
If not can I set a style in gtkrc to achieve the same?

Offline

#2 2017-01-24 01:29:51

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: xfce4-genmon-plugin fixed width

Interesting. Its not currently programmed to do so. Let me see if you can use some gtk tweaks to get it to work. Which version of genmon are you using? The GTK2 or the GTK3 version?


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 2017-01-24 02:15:19

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: xfce4-genmon-plugin fixed width

Looking at the GTK3 version, its not possible with css tweaks - the visibility doesn't exist. It would need to be coded in.

As an option, you could create a separate panel, force set the width of that panel and uncheck the "Automatically increase the length" option and then only add the genmon plugin to this panel. It will retain the same size regardless of the length of the text.

Another option might be to use a monospace font (same width chars) and have the script that you use to generate the output trim the string length to the same amount each time.


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

#4 2017-01-24 02:53:30

rfet35
Member
Registered: 2017-01-23
Posts: 21

Re: xfce4-genmon-plugin fixed width

ToZ wrote:

Looking at the GTK3 version, its not possible with css tweaks - the visibility doesn't exist. It would need to be coded in
...
Which version of genmon are you using? The GTK2 or the GTK3 version?[

v-3.4.0
I believe this is GTK2!? Assuming it is, is there a style property I could use? Btw is there an Inspector for GTK2?


ToZ wrote:

Another option might be to use a monospace font (same width chars) and have the script that you use to generate the output trim the string length to the same amount each time.

Right now I use a combination of Monospace and invisible chars. Monospace on single chars which otherwise have a bad padding and then fill up remaining space with chars of fgcolor the same color as the panel to make them invisible. Very dirty!


ToZ wrote:

LAs an option, you could create a separate panel, force set the width of that panel and uncheck the "Automatically increase the length" option and then only add the genmon plugin to this panel. It will retain the same size regardless of the length of the text.

... and use several of those next to each other to form a big panel. Also quite dirty smile

Offline

#5 2017-01-24 14:07:58

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: xfce4-genmon-plugin fixed width

So you are using the older GTK2 version of the plugin. Development has stopped on the GTK2 version as it has been migrated over to GTK3.

I had a look at both versions and there doesn't appear to be a way to limit label width via gtk rc tweaks - the only way to fix this would be to add the ability to configure this to the code base.


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

#6 2017-01-24 17:06:20

rfet35
Member
Registered: 2017-01-23
Posts: 21

Re: xfce4-genmon-plugin fixed width

Is there a place in the forum frequented by the author(s) to make feature suggestions?

Offline

#7 2017-01-24 19:12:04

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: xfce4-genmon-plugin fixed width

Well, I'm actually the current maintainer of the plugin, so I'll have a look to see what can be done. Just keep in mind that the work will be done on the GTK3 version of the plugin since the GTK2 version is basically deprecated. I will also look at trying to put together a patch that you can apply against the GTK2 code to get the same functionality working, but you'll have to build the code from source.

As an FYI, the place to create enhancement requests would be on the bug tracker for the xfce4-genmon-plugin product.


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

#8 2017-01-29 01:00:54

rfet35
Member
Registered: 2017-01-23
Posts: 21

Re: xfce4-genmon-plugin fixed width

Oh nice, may I leave some suggestions here for now:

- allow setting of width
- allow multiple bar / txt /img
- allow free placement of all the above
- allow floats in Period (s)
- allow pango markup in tooltip

Offline

#9 2017-01-29 02:08:45

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: xfce4-genmon-plugin fixed width

rfet35 wrote:

- allow setting of width

I hope to find time in the next month to work on this.

- allow multiple bar / txt /img
- allow free placement of all the above

These two will require full re-writes of the architecture of the plugin. Not sure if or when I will look at this.

- allow floats in Period (s)

The latest version allows floats

- allow pango markup in tooltip

I will investigate.


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

#10 2017-02-03 00:05:43

rfet35
Member
Registered: 2017-01-23
Posts: 21

Re: xfce4-genmon-plugin fixed width

Thanks, it would be highly appreciated if some of the these get implemented. I was replacing quite a few plugins with genmons and these were the limitations I ran into.

No rush though, I'm usually patient enough to just wait for distro packages to arrive anyway.

Offline

Board footer

Powered by FluxBB