-
-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show persistent viewport window position indicator in topbar (completes #471) #476
Show persistent viewport window position indicator in topbar (completes #471) #476
Conversation
forceTransparency method in topbar which ensures transparency is maintained so window indicator can be seen.
I think this looks very good. But I have a comment about the naming: "Window indicator" is really generic and does not really tell you anything. So at the very least we should document it properly in the code (and probably readme) what exactly it is. Also I guess it looks effectively like a scroll bar, so maybe that is a better name for it? Also maybe we need some discussion about the default color, but it is easily configurable so maybe not that important. The default color of the window selection comes from the |
Thanks @Lythenas ,
I guess it does look like a scroll bar, my only issue with referring to it as a
I think using Cheers! |
slurped windows are now taken into consideration.
(paperwm-window-position-bar).
Thoughts? should the position bar be shown when there is only one window? or only when there is at least two windows? Showing with one window seems a bit much? (not too useful?). |
…dget (so position bar colour not obscured by topbar). Original implementation had the topbar transparency set and the position bar behind it. This was okay, but the position bar colours were obscured/darkened by the topbar. This new implementation has the position bar sitting on top a backdrop widget (which has some transparency). Now the position bar colour shows unobscured.
deprecated/no-longer-used css class from stylesheet). Added window-position-bar-backdrop css class so it can be styled by users if wanted.
disable/enable and style etc.).
Hey all! I've been testing this in anger the last two weeks and has been working great. I'm planning on merging this in one week, please post any comments or thoughts re this PR if you have any. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I think the code looks good.
I will try this out for the next couple of days, before approving.
Co-authored-by: Matthias Seiffert <matthias-seiffert@hotmail.de>
On my work computer right now (running Gnome 42.5, if that matters) and I'm currently using dash-to-panel (don't remember exactly why that extension, probably just so I have the topbar on all monitors). In general it seems to work. But two small issues:
Regarding dash-to-panel: I also had to manually set it transparent in its settings. But that is probably fine. As far as I know gnome-shell has no generic topbar API. I'm not sure we should specifically support dash-to-panel. But I think we should either:
I've also been working on a PR that would show the "Workspace X" menu on all topbars and I didn't find a way to generically get all topbar. I.e. I had to access I don't have any particular reason to use dash-to-panel over any other extension. So I'm happy to switch to another. But we can also discuss this later. |
…(including `Make topbar follow monitor focus` option).
|
Added fix/final space layout call to initWorkspaces to allow for topbar/window position bar init completion.
return topbar to primary and then set monitor.
If I have a fullscreen application (e.g. a fullscreen youtube video, or just firefox with F11) the window indicator is not shown (or I guess it is below the window), which is good. But if I then focus a different monitor. The window indicator is shown above the fullscreen window. If I focus the fullscreen window again, it corrects itself (after a short delay). This also happens if Also with your multi monitor changes the backdrop is also shown if I disable And it seems like disabling the feature does not return the original opacity of the topbar. With dash-to-panel there are still some issues (actually even more after the multi monitor changes^^). But I will try to think of something independent of this PR. |
Also I think we should decide if this will now be the new default behavior or if it will just be an addon feature. In any case I think we should also add a setting for this in the UI. But that can be a separate PR when we know there are no more bugs. |
Ah ha yes! that was by design (shows the backdrop and indicator just like normal view). My thinking:
|
Good pickup! Will fix that.
Yeah, sounds good - I originally thought to just leave the backdrop there but what you mentioned is probably a better choice (return things to how they were).
Original opacity - you mean like being opaque? Interestingly, PaperWM TopBar.js sets the opacity to be slightly transparent (assuming it will stay like that) but gnome can clobber it (e.g. without this PR, right after a login, try going into overview and then clicking a window - gnome will set the topbar opaque). This PR fixes that long-standing issue (although it might not be what people are used to now?). |
windowPositionBar actors and restores original topbar.
4655d57
to
7151eda
Compare
Fixed this. |
Have implemented this. Now, disabling the window position bar will completely disable it and revert back to previous behaviour. Although, the issue with the topbar opacity (starting out as transparent but then gnome cloberring it to opaque) has been fixed (as in, PaperWM will enforce that transparency as it was originally designed to). I'm remiss to revert back to the broken behaviour - if we want the topbar to be opaque like vanilla gnome then we should just remove that transparency code. I do note that #344 suggests NOT having PaperWM change transparency. Now, we use transparency to good effect with the window position bar (and I like it! lol) but, I'm open to suggestions re this, for example we could:
Option 2 would simplify things I guess. If not, will go ahead with the first option (since that's what we've got atm). |
@Lythenas, fixed those issues you raised, could you give the latest a test when you can? Cheers! |
now on top of the window position bar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I haven't noticed any more issues.
Thanks for the awesome feature.
enabling/disabling.
enough feature to justify adding to the preferences ui.
61700ea
to
b25473f
Compare
b25473f
to
5df2228
Compare
Thanks @Lythenas! I've just cleaned up some stuff and also I did end up adding the enable/disable toggle to the settings ui. I believe this feature is a big enough, prominent enough, and changes enough of the previous behaviour to justify adding it to the settings ui. I also updated the README.md and added the video from this PR to it. I'll merge this shortly. |
Fixes #471
This PR adds a window position indicator bar as described in #471.
The bar style can be overriden with the css class
paperwm-window-position-bar
.I've also added a schema property to enable/disable showing the position bar.
You can disable it from the command line with:
dconf write /org/gnome/shell/extensions/paperwm/show-window-position-bar false
and enable it with
dconf write /org/gnome/shell/extensions/paperwm/show-window-position-bar true
See the window position bar (topbar blue coloured segment indicating window tiled position) in the video below:
paperwm-window-position-bar.mp4
Feedback welcome!
The indicator might not be wanted by some users - so, it might be worth adding a toggle in the paperwm preference ui.
NOTE: this PR has been implemented in the PaperWM-redux fork, which you can install if you want this, or any of my other open PRs.