PaperWM icon indicating copy to clipboard operation
PaperWM copied to clipboard

Apps not using full height in workspaces without top bar

Open Mohs9n opened this issue 2 years ago • 7 comments

Is your feature request related to a problem? Please describe. I hide the top bar on all workspaces except one, and when switching between workspaces, apps in workspaces where the top bar is hidden get resized as if the top bar is there so they are not taking the maximum height.

Describe the solution you'd like Apps in workspaces without the top bar should not take the bar height into consideration.

Additional context

https://github.com/paperwm/PaperWM/assets/97781843/fb3e56f4-5479-4b5f-a6e1-957fc7e110d4

Edit: Even if the bar is hidden in all workspaces, it still happens because the bar is shown while switching workspaces, I tried disabling the bar on the desktop with the Just perfection extension and apps still have the full height after switching between workspaces, So maybe an option to not show the top bar while switching workspaces would fix the issue?

Mohs9n avatar Nov 24 '23 22:11 Mohs9n

Thanks for reporting @Mohs9n, definite bug. I can reproduce so will try looking into this when I can.

Jay.

jtaala avatar Nov 25 '23 23:11 jtaala

@jtaala that might actually also be fixed by my PR #707 ~(but I have to retest that again)~ Edit: seems to be fixed at least for the case where there is no topbar on the second monitor, which is not exactly the same issue since here it is all on the same monitor.

@Mohs9n how exactly are you hiding the topbar on all workspaces except one? We might need to adapt the check a bit to also check if the topbar is completely hidden (instead of just the position).

Lythenas avatar Nov 26 '23 09:11 Lythenas

how exactly are you hiding the topbar on all workspaces except one?

image

So, this is input is actually a relic from the time when we had a topbar that followed focus. But it still works (kind of).

jtaala avatar Nov 26 '23 10:11 jtaala

Ah never used that :D I can also fix this in #707 if you want since I'm changing that code anyway (and in that PR I think I currently actually broke that functionality^^).

Lythenas avatar Nov 26 '23 10:11 Lythenas

Nice one! Sounds good - I had a quick look at the issue, and would have to do with fixTopbar method and the update/showTopBar methods (which you're working on anyway).

jtaala avatar Nov 26 '23 10:11 jtaala

Will leave to you. Note, the space at top etc. is generally caused by layout's workArea calculation. Wit the topbar approaches, we're influencing it by changing PanelBox.height etc.

We could also do that logic more explicitly in layout, e.g. like I did for the window position bar, e.g. https://github.com/paperwm/PaperWM/blob/release/tiling.js#L607-L615

Anyways, that TopBar stuff def needed a good refactor and improvement.

Thanks @Lythenas.

jtaala avatar Nov 26 '23 10:11 jtaala

Is it possible to revisit this since https://github.com/paperwm/PaperWM/pull/707 won't be finished in the near future? Or is the Fullscreen Avoider compatibility issue related to this bug? if it is, then never mind!

cbmiller2610 avatar May 20 '24 15:05 cbmiller2610

Hey @cbmiller2610 - yes, I'll have a look at this one again.

jtaala avatar May 29 '24 21:05 jtaala

Hey @cbmiller2610 and others,

I've done some work on this - it was quite a complicated refactor/rewrite and it is possible I've missed some corner cases with this behaviour.

Can you please test this PR?

git fetch --all
git checkout  fix-709-notopbar-layout-height
./install.sh

then logout / login.

jtaala avatar Jun 13 '24 06:06 jtaala

I installed the new branch this morning, currently looks like it's working as intended! PaperWM is my daily driver, I'll continue to use it and see if I find any edge cases.

cbmiller2610 avatar Jun 14 '24 12:06 cbmiller2610

@jtaala one issue I didn't notice on the last PaperWM version: now when you bring windows to scratch they get vertically resized, and some windows actually make vertical size go to zero (Kitty terminal). The Element Matrix client now gets resized very small, and I definitely never noticed it before (I often leave it open on my scratch layer). If this is not related, let me know if I should open a separate issue!

https://github.com/paperwm/PaperWM/assets/7013753/4a8e48f8-2112-4625-8ab4-9c707c3cd79b

cbmiller2610 avatar Jun 14 '24 13:06 cbmiller2610

Another bit of feedback: hiding the top bar needs to also disable the Window Position Bar for those workspaces in order for the TopBar space to go away, (see screenshot with Window Position Bar Enabled) Screenshot from 2024-06-14 09-11-10

cbmiller2610 avatar Jun 14 '24 13:06 cbmiller2610

@jtaala one issue I didn't notice on the last PaperWM version: now when you bring windows to scratch they get vertically resized, and some windows actually make vertical size go to zero (Kitty terminal). The Element Matrix client now gets resized very small, and I definitely never noticed it before (I often leave it open on my scratch layer). If this is not related, let me know if I should open a separate issue!

Screencast.from.2024-06-14.08-57-44.trimmed.mp4

Good pickup. Does this happen in latest release or just on this branch?

jtaala avatar Jun 14 '24 13:06 jtaala

now when you bring windows to scratch they get vertically resized

Thanks @cbmiller2610, have now fixed that (pull latest on the PR branch).

jtaala avatar Jun 14 '24 22:06 jtaala

Another bit of feedback: hiding the top bar needs to also disable the Window Position Bar for those workspaces in order for the TopBar space to go away, (see screenshot with Window Position Bar Enabled)

That makes sense.

I can see that some users may want to disable window position for certain workspaces (like we do topbar) - and even (for some reason) disabled topbar but have window position bar?

Thoughts on adding a disable Window Position Bar under the Hide top bar option in workspaces and have them selectable (so in your case you would select both options).

jtaala avatar Jun 14 '24 22:06 jtaala

That's fair, I guess it makes sense some users would still want the visual hint despite no top bar. The idea of grouping the toggles together in Workspaces is a great idea, and it adds an additional customization (since right now the Window Position Bar can only be enabled/disabled globally). So I'd think you'd want to remove the universal toggle from under "Settings" as well, and just have the per-workspace toggles under Workspaces.

cbmiller2610 avatar Jun 15 '24 01:06 cbmiller2610

now when you bring windows to scratch they get vertically resized

Thanks @cbmiller2610, have now fixed that (pull latest on the PR branch).

Looks like that fixed the issue! Awesome

cbmiller2610 avatar Jun 15 '24 01:06 cbmiller2610

So I'd think you'd want to remove the universal toggle from under "Settings" as well, and just have the per-workspace toggles under Workspaces.

No, we wouldn't remove a global setting for this. Think of the workspace settings as an override for that specific space. The wording is important here, it'll be "Hide Position Bar".

This works the same way as the topbar setting. There's actually a hidden dconf setting default-show-topbar. That is, we set a global setting (on/off), then we allow users to override that setting on a per-workspace case - that is, to "hide" it if the global setting is on.

Otherwise, users would have to set it for each workspace (which would suck in the case of dynamic workspaces).

jtaala avatar Jun 15 '24 02:06 jtaala

Ah ok, I understand! That would be great, makes sense to me.

cbmiller2610 avatar Jun 15 '24 03:06 cbmiller2610

@cbmiller2610 - pull the latest. I've implemented the per workspace overriding for position bar.

I think I got all the corner-cases for this. Let me know if you run into issues.

jtaala avatar Jun 15 '24 06:06 jtaala

@jtaala I think this is probably the last thing, there is a case like is shown below:

Global Window Position Bar : toggled ON Workspace Specific Hide Gnome Top Bar: toggled OFF Workspace Specific Hide Window Position Bar: Toggled ON

This results in the Window Position Bar remaining active on that workspace, despite the toggle. Screenshot from 2024-06-15 09-22-30 Screenshot from 2024-06-15 09-20-03 Screenshot from 2024-06-15 09-19-35

cbmiller2610 avatar Jun 15 '24 13:06 cbmiller2610

Ah, it also seems that the Window Position Bar hiding isn't quite working in general. I have TopBar and Window Position Bar set to hidden on Workspaces 3,4,5, and the Window Position Bar keeps showing up again. It will go away if you bring up the settings and turn the toggles off and on, but as soon as you start working with the windows it will show up again!

cbmiller2610 avatar Jun 15 '24 14:06 cbmiller2610

Ah, it also seems that the Window Position Bar hiding isn't quite working in general. I have TopBar and Window Position Bar set to hidden on Workspaces 3,4,5, and the Window Position Bar keeps showing up again. It will go away if you bring up the settings and turn the toggles off and on, but as soon as you start working with the windows it will show up again!

hmmm - seems there's still some bugs here. Although, I'm not seeing this (trying to reproduce your setup). Can you confirm the commit you're on? (it should be 210a37dd724e658b52a21aaaefe09b47ff1feda1).

Lastly, can you take a pic of the workspaces shown on your setup, e.g. like:

image

Cheers.

jtaala avatar Jun 15 '24 14:06 jtaala

@jtaala Finally got back around to looking at this, and now everything is working fine. Looking back, I suspect I may have gotten distracted and not logged out/in after git pull... apologies for the confusion. I'll keep an eye out, but it looks good to me!

And yes, I'm on the latest:

commit 210a37dd724e658b52a21aaaefe09b47ff1feda1 (HEAD -> fix-709-notopbar-layout-height, origin/fix-709-notopbar-layout-height) Author: Jay Ta'ala [email protected] Date: Sat Jun 15 21:03:43 2024 +1000

Replaced (where appropriate), instances of `add_child` with checked
substitutes.

cbmiller2610 avatar Jun 16 '24 00:06 cbmiller2610

Thanks @cbmiller2610 - just updated the branch a little (small reversion of some changes).

I noticed once during workspace (sequence) switching that releasing the keybind didn't bring it out switching mode (had to hit escape to exit it) - but I can't reproduce this now. Let me know if you see this too btw.

jtaala avatar Jun 16 '24 01:06 jtaala

P.S. I feel we should add some keybinds for these (toggle hiding topbar / position bar) for a workspace. I reckon it might be useful to hide/unhide these elements for a workspace quickly (e.g. when I don't want see the topbar/time for example when I need to focus on something).

jtaala avatar Jun 16 '24 01:06 jtaala

That would be great! What about: Super+h or Super+g: Toggle Gnome TopBar Super+p: Toggle Window Position Bar

Currently Super+h is a bit weird in PaperWM anyways IMO, since it hides windows in the typical gnome way (which doesn't seem to fit the PaperWM paradigm I've seen so far). When you hide a window using Super+h you have to recall it using the same keybinds you would use for scratch windows. I never use this, and instead almost always just throw the window I want to hide onto another workspace, or into scratch.

Super+p is something related to multi monitor setups, and also doesn't even seem to be something people appreciate in Gnome anyways... https://askubuntu.com/questions/1487924/what-is-mapped-to-superp

cbmiller2610 avatar Jun 16 '24 02:06 cbmiller2610

Super+h or Super+g: Toggle Gnome TopBar Super+p: Toggle Window Position Bar

See latest commit.

Well, good logical keybinds are getting harder to find in PaperWM. To ease this, I've chosen one default, simple keybind (Ctrl+Super+b) which will toggle both topbar and position bar (together) and then allow users to change that and to set the others as they like:

image

jtaala avatar Jun 16 '24 02:06 jtaala

Currently Super+h is a bit weird in PaperWM anyways IMO, since it hides windows in the typical gnome way (which doesn't seem to fit the PaperWM paradigm I've seen so far). When you hide a window using Super+h you have to recall it using the same keybinds you would use for scratch windows. I never use this, and instead almost always just throw the window I want to hide onto another workspace, or into scratch.

Just a note here - super+h is just normal gnome window hide, and you recall it using the normal gnome approaches (e.g. you can see the hidden windows in gnome overview).

We wouldn't overwrite that in default PaperWM as it's used by others and works fine in PaperWM.

Also wouldn't overwrite super+p for similar reasons - it's used and works fine in PaperWM (i.e. I use super+p all the time for monitor/display changing).

jtaala avatar Jun 16 '24 04:06 jtaala

@jtaala Wow the keybindings make this really awesome. It's like instant focus mode with the TopBar off, and when you need something it seems so much nicer to just unhide the TopBar rather than going to the Gnome overview. This is a great addition to PaperWM!

cbmiller2610 avatar Jun 17 '24 01:06 cbmiller2610