Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-11-02 21:34:07

cosmo666
Member
Registered: 2019-08-10
Posts: 18

Howto set workspace pager panel control background colors

To be clear, this has nothing to do with the panel foreground/background color. This is about setting the foreground/background colors to be used displaying the workspace pager control when that feature is added to the panel.

The workspace-pager can be configured to display either a workspace name, or a dynamically generated miniature view of each workspace-rectangle on the control as it sits on the panel. In either case, its important to know which workspace is currently selected, and in theory, that is accomplished by setting a different background color/shade for the selected workspace, and possibly an additional color for 'hovering'. Apropos...

<user>/.config/gtk-3.0/gtk.css...
WnckPager { background-color: #0F0000; }
WnckPager:selected { background-color: #00000F; }
WnckPager:hover { background-color: #000FA0; }

I'm guessing here, since I could find no actual references to this in the XFCE documentation, nor in the xfce4-settings-editor. Bottom-line, changing the above entries in 'gtk.css' have no effect on the actual desktop. I'm running Xubuntu 16.04 on a half-dozen machines, and all but one of them demonstrate the same problem: there is a very faint change in the shade of the background of an individual workspace-rectangle when I put the mouse cursor in 'hover' mode. But the change is only noticeable as you move between the rectangles. Once you stop moving the cursor, or remove the cursor, all of the rectangle backgrounds look exactly the same, so you can't tell which one is selected. On one fresh install of Xubuntu 16.04 there is a very pale blue background which tracks the selected workspace. However, I can't find any indication of why that one is working, because I can find no documentation of where or how this property of the workspace-switcher is supposed to be set. There are no references to the workspace-switcher in the fresh-install xfce4 settings tool, other than 'plugin-11 String pager'. I have attempted to locate the source code for the 'miniature desktop image' generator, because it seems to me thats the program that should or at least could identify the current workspace each time it changes.

I apologize for the [useless] detail, but there is so much on-line confusion of terminology between 'panel', 'pager', 'workspace switcher', and 'background', I've spent hours trying to find some discussion of this subject on-line, without finding a solution. I consider the 'virtual desktop' features of Linux to be among its best features, and the implementation under Xubuntu would be very strong, were it not for this defect.

Thanks in advance for any clues as to how to resolve this.

Offline

#2 2019-11-02 22:06:18

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

Re: Howto set workspace pager panel control background colors

cosmo666 wrote:

I'm running Xubuntu 16.04

Xubuntu 16.04's Xfce is based/built on GTK2. You will need to use gtk2 tweaks to affect that plugin. These tweaks need to be made to ~/.gtkrc-2.0. I don't have a gtk2-based Xfce readily available, but the code would look something like this:

style "my-workspace-switcher"
{
 	bg[ACTIVE] = #FF0000
	bg[SELECTED] = #FFFF00
}
widget "*WnckPager*"			style "my-workspace-switcher"
widget "*PagerButtons*"			style "my-workspace-switcher"

...adjust the colour codes as needed.


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 2019-11-03 00:43:03

cosmo666
Member
Registered: 2019-08-10
Posts: 18

Re: Howto set workspace pager panel control background colors

Thanks for the prompt reply. I found one of six Xubuntu 16.04 systems of mine that actually had a GTK2 config directory originally installed, and those two were recent installs, with almost no changes of any kind. The only file in the gtk-2.0 directory was 'gtkfilechooser.ini', and had nothing to do with the panel apps as far as I could tell.

I did try creating a gtk.css file with variations of what you suggested. For example:

/* select-on */
@define-color selected_bg_color #0debe9;
@define-color selected_fg_color #e71616;
@define-color theme_selected_bg_color @selected_bg_color;
@define-color theme_selected_fg_color @selected_fg_color;
/* select-on */

/* this was in the original... */
/* workspace backgrounds */
/* wnck-pager { background-color: #ff0000; } */
/* wnck-pager:hover { background-color: #00ff00; } */
/* wnck-pager:selected { background-color: #0000ff; } */

style "my-workspace-switcher"
{
        bg[ACTIVE] = #FF0000
        bg[SELECTED] = #00FF00
}
widget "*WnckPager*"             style "my-workspace-switcher"
widget "*PagerButtons*"          style "my-workspace-switcher"

But wasn't even able to ascertain whether it was being loaded or not, given the various
levels of indirection Ubuntu is using to try and keep the chaos under control. Another
problem, I don't know whether 'wnck-pager' or 'WnckPager' are either both right,
or both wrong, and wading into XFCE to figure it all out is a time-sink I can't afford
at the moment.

I do appreciate your attempt to help. Frankly, I'm starting to get a little pessimistic about the Linux experiment.
I'd hate to see it go off the rails...

BTW, if you do know where the app that creates the 'miniature desktop image' (inside the pager workspace tabs) can be found, I might be able to modify that in a way which would solve the problem.

thanks again for trying.
Ted in Portland, OR

Offline

#4 2019-11-03 02:20:52

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

Re: Howto set workspace pager panel control background colors

Sorry, I wasn't clear. The file you need to create should not be called gtk.css, but rather a hidden file in your home directory called .gtkrc-2.0 (the preceding dot is important). It is in this file that you need to add the code above.

I just fired up a Xubuntu 16.04 VM to double-check, and here is the exact code you need to put in (my initial guess was off - missed some quotes and the widget identifier was incorrect):

style "my-workspace-switcher"
{
        bg[ACTIVE] = "#FF0000"
}
widget "*pager*"             style "my-workspace-switcher"

For the code in between the {}s, your options are:

  • fg[NORMAL] = window border colors on inactive workspaces

  • fg[PRELIGHT] = window border color of windows on inactive workspace when hovered over

  • fg[SELECTED] = border color of active workspace indicator and window borders on active workspace

  • bg[NORMAL] = active & inactive workspace border color, inactive workspace shaded background and window backgrounds

  • bg[PRELIGHT] = inactive workspace shaded background and window backgrounds when hovering over

  • bg[SELECTED] = workspace and window background color of active workspace

So if you used all of them, the complete list would look something like this:

style "my-workspace-switcher"
{
        fg[NORMAL] = "#FF0000"
        fg[PRELIGHT] = "#FF0000"
        fg[SELECTED] = "#FF0000"
        bg[NORMAL] = "#FF0000"
        bg[PRELIGHT] = "#FF0000"
        bg[SELECTED] = "#FF0000"
}
widget "*pager*"             style "my-workspace-switcher"

...of course, change the colour codes.

I do appreciate your attempt to help. Frankly, I'm starting to get a little pessimistic about the Linux experiment.
I'd hate to see it go off the rails...

It does take time to understand linux, it's different enough from the main stream OSs, but it is well worth it. It just takes patience. This piece of the puzzle is one of the more complicated pieces to do.


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 2019-11-03 05:30:15

cosmo666
Member
Registered: 2019-08-10
Posts: 18

Re: Howto set workspace pager panel control background colors

Thanks so much ToZ for the follow-thru. Although the first two machines I tried it on didn't like it, the third one was the charm!
And interestingly, the third one already had a .gtkrc-2.0 file on it, albeit, it did not have an entry for the pager widget. In any case, I'll track down the other problems -- probably due to installing GTK3 versions not completely compatible with 16.04.

Believe me, I'm not down on Linux at all. Its my fourth *NIX OS since 1994, and by far the best of the lot. The thing that troubles me is the fact that the open-source 'business model' is under assault from such a variety of exploiteurs, attempting to carve out semi-proprietary 'territories' if you will. In this case, I think the Xubuntu team should have found a way to stay in sync with XFCE, since XFCE is their flagship feature (in my view at least). I've also been a little disappointed with Ubuntu's stewardship over what was once definitely best-of-breed Linux provider, starting with the Unity fiasco, then systemd and snapd, both of which have imposed a lot of work on a lot of people who had no say in the matter. Meanwhile, we continue to slide towards proprietary browsing...

In any case, can't thank you enough for taking the time to deliver the complete solution. I've already decided its time to bite the bullet and upgrade some of my machines to 18.04, maybe try running MATE on one of them.

Best, -Ted

PS: Linus Torvalds lives here in Portland too!

Offline

#6 2019-11-03 13:30:25

alcornoqui
Member
Registered: 2014-07-28
Posts: 831

Re: Howto set workspace pager panel control background colors

Hey OP, may I suggest you check MX Linux?

A carefully built Debian based distro with Xfce as first class citizen and default desktop, with systemd present but disabled by default.

Plus they are aware and incorporate a lot of ToZ's knowledge!

Offline

#7 2019-11-03 15:58:49

cosmo666
Member
Registered: 2019-08-10
Posts: 18

Re: Howto set workspace pager panel control background colors

Alcornoqui, Thanks very much for that suggestion. I'm on it, will definitely install & check it out. Here's another systemd-free distro I've been following, although haven't installed their latest yet, so can't testify as to how solid it is.
https://voidlinux.org/
Its their own distro, with their own from-scratch alternative to apt. However, when I last installed it in '18, there were still some issues, so I decided to wait a bit.

PS:Just took a look at MX Linux specs on website. Very interesting -- craftsmanship & vision, similar values in place at Void Linux. Best analysis of systemd and the reasons I prefer not to use it, even though initially it has seemed to perform well. Many of the same concerns apply to snapd. Case in point: the developers of VLC made a decision to drop all other installation media in favor of snapd, which creates a bunch of loop devices intended to act as containers for each installed app. This ended up breaking VLC for one of my critical use scenarios (remote sshfs, which requires a secure identity to access volumes). However, the snapd team had no interest in addressing the matter (nor did VLC). Its the Microsoft mentality permeating modern *NIX:
"Do it our way, or hit the highway..."

Last edited by cosmo666 (2019-11-03 16:27:38)

Offline

Board footer

Powered by FluxBB