You are not logged in.
I'm on MX Linux 19.2 32-bit, XFCE 4.14 (panel 4.14.1).
In my ~/.config/gtk-3.0/gtk.css, I have (test colors):
wnck-pager {
background-color: #0000ff;
}
wnck-pager:selected {
background-color: #00ff00;
}
wnck-pager:hover {
background-color: #ff0000;
}
But it only works in "miniature view mode"; it does unfortunately not work in text/label mode. Please tell me it's possible to style...
*Edit*
Also, it would be nice if there was a custom (aka proprietary) psudo-class, like
wnck-pager:-xfce-populated
To style based on workspace(s) containing 1+ windows or not.
Last edited by etr (2020-06-11 09:38:38)
Offline
When in miniature mode, the wnck-pager element is replaced with toggle buttons. The following will work:
#pager-1 button { background-color: red; }
#pager-1 button:checked { background-color: green; }
#pager-1 button:hover { background-color: yellow; }
...replace "#pager-1" with the actual name of your pager.
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
Thank you very much ToZ, works very well.
Regarding workspaces with 1+ windows, is there any way to style ?
Earlier I hasted and wrote:
wnck-pager:-xfce-populated
requesting a way to style populated workspace buttons. Beside being wrong, it's also unnecessary to use a pseudoclass.
I should have asked for a class instead, something like:
#pager-N button.populated
Launching the panel with GTK_DEBUG=interactive and inspecting the workspace switcher, I see no class added to populated workspace buttons. That would have let us style based on that. I would say we need that.
Last edited by etr (2020-06-10 22:27:19)
Offline
Because wnck-pager is a child of widget, it should be able to inherit properties from GtkWidget. And it does for some like background-color and color. Here is how the colours mapped in GTK2. But with GTK3 it doesn't seem consistent, at least for me.
Regarding workspaces with 1+ windows, is there any way to style ?
Unfortunately I don't see how this is possible. The number of windows doesn't seem to be exposed in any way to theme.
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
Unfortunately I don't see how this is possible. The number of windows doesn't seem to be exposed in any way to theme.
Well I know, it is not exposed right now. I'm requesting whether XFCE devs can consider adding support. I don't know exactly which part of the desktop provides the workspace support; whether it's the panel itself, or if it's the wm, I don't know. But whichever it is, can xfce4-panel not add a 'populated' class to '#pager-N button's whenever the window-count of a workspace goes from 0 to 1, and remove that class when the count goes from 1 to 0 ?
This way we could do:
#pager-N button.populated {background-color: COLOR_POPULATED; }
etc...
I did actually think about window-count itself being exposed to theme, but then again CSS has limitations. With window count, perhaps CSS rule could simply decide whether the window-count should be displayed on buttons or not, and if yes, then how it would be styled (font, size, positioning, etc). MHO.
Last edited by etr (2020-06-11 00:42:28)
Offline
I'm requesting whether XFCE devs can consider adding support.
The best way to ask is by creating an enhancement request or reaching out via the xfce4-dev mailing list.
I don't know exactly which part of the desktop provides the workspace support; whether it's the panel itself, or if it's the wm, I don't know.
xfce4-panel's pager plugin (link to code) provides the support by leveraging off of Gnome's libwnck libraries. A number of Xfce components use these libraries, but xfce4-panel's pager plugin is what directly displays the pager on the panel.
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
etr wrote:I'm requesting whether XFCE devs can consider adding support.
The best way to ask is by creating an enhancement request or reaching out via the xfce4-dev mailing list.
Thanks!
xfce4-panel's pager plugin (link to code) provides the support by leveraging off of Gnome's libwnck libraries. A number of Xfce components use these libraries, but xfce4-panel's pager plugin is what directly displays the pager on the panel.
Yes, I know panel's pager/ws-switcher plugin shows the workspaces, I was just wondering/speculating whether the WM itself needs to/has any support for workspaces. If not, then the questions arises how utilities like 'wmctrl' operate. I'm sure wmctrl does not use gnome libraries, and most likely only uses x11. But it's not really important (this) topic-wise.
Offline
[ Generated in 0.013 seconds, 9 queries executed - Memory usage: 552.71 KiB (Peak: 569.99 KiB) ]