PaperWM
PaperWM copied to clipboard
Make "Window Glow" Optional
Is there a way to disable the border around windows?
Maybe a duplicate of #213
Yes, use something like this in stylesheet.css:
.paperwm-selection {
background-color: transparent;
border: 0px;
}
(display: none
did not work here)
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.
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.
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.
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.
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.
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.
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.
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)
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.
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
.
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.).