PaperWM icon indicating copy to clipboard operation
PaperWM copied to clipboard

Make "Window Glow" Optional

Open rawkode opened this issue 4 years ago • 10 comments

Is there a way to disable the border around windows?

rawkode avatar Apr 17 '20 10:04 rawkode

Maybe a duplicate of #213

rawkode avatar Apr 17 '20 10:04 rawkode

Yes, use something like this in stylesheet.css:

.paperwm-selection {
    background-color: transparent;
    border: 0px;
}

(display: none did not work here)

olejorgenb avatar Apr 18 '20 07:04 olejorgenb

Guess I'll expand a bit on why the window highlight is there (it's not just to make the focus window more distinct).

When navigating we delay focus until Super is released (navigation is a pseuo-mode). This makes it possible to «escape» navigation, and also undo a larger left/right navigation using alt-tab (alt-tab would really be fairly unusable without delayed focus).

Now this means there's no native indicator for our pseudo-focus (apart from the minimap, which might become optional in the future). So the window highlight primary purpose is showing the pseudo-focus while navigating.

Saying that, it might make sense to experiment with only showing the window highlight when the focus and pseudo-focus differs.

hedning avatar Apr 18 '20 13:04 hedning

I actually like the "highlight", I just want to change the color. In Gnome-3.34 selection highlights are now all gray-ish. I have tried the following:

.paperwm-selection {
    background-color: gray;
    border-color: gray;
    border: 10px;
}

But is does not change anything after disabling and enabling the PaperWM-extension. Is there a way to inject the change into the gnome-shell, because Alt-FT and "r" is not available in a wayland-session. And I don't want to logout each time I find that the color does not fit right.

poinck avatar Apr 27 '20 15:04 poinck

You can test things out in looking glass (Alt-F2 lg):

paperwm = imports.ui.main.extensionManager.lookup("paperwm@hedning:matrix.org");
paperwm.imports.tiling.spaces.selectedSpace.selection.style = `
background-color: gray;
....
`

IIRC getting the css to work require a restart unfortunately.

hedning avatar Apr 27 '20 15:04 hedning

Wow, I tricked it using the "User themes"-extension. I places the CSS above at ".local/share/themes/custom/gnome-shell/gnome-shell.css". Toggling the "User themes"-extension now enabled the custom CSS.

Others who may try this solution need to find a howto on enabling user themes first, if they don't know already.

@hedning Btw. Great work. (: I hope that you can keep up with all the API-changes Gnome introduces now and then.

poinck avatar Apr 27 '20 15:04 poinck

The problem with the glow is that it's behind the window too; which means any windows (terminals) with transparency inherit this weird blue background.

rawkode avatar May 04 '20 22:05 rawkode

Solving for transparent windows gets pretty tricky since we'd have to know the shape of the window, which can vary a lot due to different themes. Having the highlight non-transparent would reduce problems though.

We're open to a better default style though as the blue doesn't seem all that popular :p Eg. something like the alt-tab selection style.

hedning avatar May 04 '20 22:05 hedning

This might be completely crazy and also may not be possible, but I was reading this issue and it got me wondering if it might help reduce distraction and be aesthetically pleasing to slightly dim all the non-focused windows instead of putting a glow around the focused window. I think the really tricky thing about doing this would be making the effect subtle enough that it doesn't affect the ability to refer to information in a displayed window that doesn't have focus while being distinct enough to aid navigation.

kamidon avatar Sep 29 '20 14:09 kamidon

It is possible :)

And not crazy enough to not have been done before: :smile:

  • https://linux.die.net/man/1/urxvt (search for fade)
  • https://github.com/blueyed/vim-diminactive
  • https://extensions.gnome.org/extension/650/shade-inactive-windows/
  • https://github.com/lviggiani/gnome-shell-extension-wbe
  • https://askubuntu.com/questions/1146348/disable-inactive-window-dimming

I think the really tricky thing about doing this would be making the effect subtle enough that it doesn't affect the ability to refer to information in a displayed window that doesn't have focus while being distinct enough to aid navigation.

Agreed - would been easier if the window content was more uniform (eg. always simple text on white background)

olejorgenb avatar Sep 29 '20 16:09 olejorgenb

Hey @smichel17 - this PR should prob be closed, given the ability to remove "glow" or override paperwm-selection style with preferred border, size, colour, etc. with user.css from #414.

jtaala avatar Dec 31 '22 02:12 jtaala

Will close this in a month or so. As mentioned, this behaviour can be changed to user preferred visuals with overriding css style paperwm-selection.

jtaala avatar Mar 11 '23 08:03 jtaala

Closing this now. Note, see https://github.com/paperwm/PaperWM/issues/390#issuecomment-1500824453 to change style of "glow" (in that example they wanted to hide it but you can change it to any color etc.).

jtaala avatar Apr 08 '23 09:04 jtaala