Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-09-27 08:15:45

SMXuser
Member
Registered: 2023-03-08
Posts: 9

[SOLVED] Desktop switcher ... Adding a border for each Desktop

I'm wondering if this is possible? I've been using XFCE for 10+ years now. One of my favorite items is the Desktop switcher that shows up in the bottom panel (or whichever panel you choose to have it). For me there are always three desktops available, each with a specific purpose. However, sometimes I'm only using a single desktop for a couple of days before I access one of the other desktops for their respective purposes.

During this time, using a dark theme, only the first active desktop is actually visible because it's being utilized. Sure, all three of the desktops are there and available, but the other two simply "vanish" (for lack of better words) into the panel. So during that time I end up looking at an ugly blank space which I find personally somewhat unattractive.
When all items are minimized the blank space is even larger.  sad

How difficult (or is this possible already) would it be to have each desktop surrounded by a 1 px or a 2 px border permanently? In other words, even when the one or both of the other desktops isn't being used at least there's a border to show its existence? Perhaps something that's not permanent by default but rather something that can be activated, similar to the naming of each desktop or the designated borders? Alternatively perhaps designating a specific background desktop color by the user, for each desktop in the desktop switcher?
To me, such a border or a background would make XFCE even more perfect than it already is.  wink

Last edited by SMXuser (2023-09-27 12:46:57)

Offline

#2 2023-09-27 10:29:13

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

Re: [SOLVED] Desktop switcher ... Adding a border for each Desktop

The element to target would be "wnck-pager" (in ~/.config/gtk-3.0.gtk.css).

To add a border, you could use a box-shadow inset:

wnck-pager {box-shadow: inset 0 0 0 1px red}

To change the background colour of the cells, you can focus on the states (default, hover, and checked) if you wanted some distinction, and something like:

wnck-pager {background-color: red}
wnck-pager:hover {background-color: green}
wnck-pager:checked {background-color: blue}

Or you could use a combination of the two.


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 ---

Online

#3 2023-09-27 11:13:09

SMXuser
Member
Registered: 2023-03-08
Posts: 9

Re: [SOLVED] Desktop switcher ... Adding a border for each Desktop

Oh wow, thank you so much for the quick reply. I'll check out those settings and report back.
Would I need to reboot afterwards or is it enough to log out and back in again?

Last edited by SMXuser (2023-09-27 11:13:48)

Offline

#4 2023-09-27 11:53:02

SMXuser
Member
Registered: 2023-03-08
Posts: 9

Re: [SOLVED] Desktop switcher ... Adding a border for each Desktop

Alright, so utilizing the following just for test purposes:

wnck-pager {background-color: yellow}
wnck-pager:hover {background-color: grey}
wnck-pager:checked {background-color: blue}

Makes all three desktops show up in yellow permanently, regardless if apps are minimized or not. Hovering over a desktop causes that desktop color to turn grey. But when I click on a desktop nothing else changes. Everything remains yellow and only the hover color is also working. So I'm wondering what the blue (checked) is supposed to be showing?
Isn't that supposed to be the color of the active working desktop background color?

Offline

#5 2023-09-27 11:59:23

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

Re: [SOLVED] Desktop switcher ... Adding a border for each Desktop

SMXuser wrote:

Isn't that supposed to be the color of the active working desktop background color?

Yes. Try restarting the panel:

xfce4-panel -r

Which distro and version of Xfce are you running?


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 ---

Online

#6 2023-09-27 12:07:57

SMXuser
Member
Registered: 2023-03-08
Posts: 9

Re: [SOLVED] Desktop switcher ... Adding a border for each Desktop

I'm using the latest MX Linux distro ...

Okay, I'll try the panel restart. Before I was doing a CTRL + ALT + Backspace to restart X.

Same as before ... Yellow = permanent, Grey = hover, Blue = ???

Last edited by SMXuser (2023-09-27 12:09:22)

Offline

#7 2023-09-27 12:12:46

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

Re: [SOLVED] Desktop switcher ... Adding a border for each Desktop

Took another look to confirm and sorry, my bad. The pseudo-class should be "selected" not "checked":

wnck-pager {background-color: yellow}
wnck-pager:hover {background-color: grey}
wnck-pager:selected {background-color: blue}

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 ---

Online

#8 2023-09-27 12:22:13

SMXuser
Member
Registered: 2023-03-08
Posts: 9

Re: [SOLVED] Desktop switcher ... Adding a border for each Desktop

Alright, that's perfect. smile

wnck-pager {box-shadow: inset 0 0 0 1px red}
wnck-pager {background-color: black}
wnck-pager:hover {background-color: green}
wnck-pager:selected {background-color: grey}

That works for me on a permanent basis quite well because the red frame goes together with the black background very nicely. Green for hovering because green is "go for it" as in a green light, and then grey for selected because that's a good color to allow other open apps to show up nicely. I tried to use light-green for the hover but received an error in the terminal.

EDIT:

I was able to get a lighter green working with html color code. I figured this should work since css was being utilized. So now the line with the green has this inserted:  #28C358 (in lieu of the word green)
This topic has been solved. Wonderful and very pleased. Thanks again.  smile

Last edited by SMXuser (2023-09-27 12:43:48)

Offline

#9 2023-09-27 12:41:02

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

Re: [SOLVED] Desktop switcher ... Adding a border for each Desktop

SMXuser wrote:

I tried to use light-green for the hover but received an error in the terminal.

Try using "LightGreen" instead. Color names can be found in /usr/lib/X11/rgb.txt (or https://www.astrouw.edu.pl/~jskowron/co … 1/rgb.html).

Last edited by ToZ (2023-09-27 12:43:32)


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 ---

Online

#10 2023-09-27 12:45:59

SMXuser
Member
Registered: 2023-03-08
Posts: 9

Re: [SOLVED] Desktop switcher ... Adding a border for each Desktop

Thanks. That worked just as well as the html code.  wink

Offline

Board footer

Powered by FluxBB