Skip to content
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

Option to move a workspace to a monitor instead of swapping #824

Closed
malcolmredheron opened this issue Apr 11, 2024 · 10 comments · Fixed by #825
Closed

Option to move a workspace to a monitor instead of swapping #824

malcolmredheron opened this issue Apr 11, 2024 · 10 comments · Fixed by #825
Labels
enhancement Adds a new feature or extends scope

Comments

@malcolmredheron
Copy link

I'd like an easier way to put a workspace on a given monitor.

Is your feature request related to a problem? Please describe.
At the moment I can swap a workspace with the one on the monitor to the left/right/etc. But generally I'm happy with where that workspace is already, otherwise I'd have moved it already. It becomes a bit of a rubik's cube puzzle to figure out which workspace to switch to on the other monitor so that when I swap the two workspaces I'm happy with the result.

Describe the solution you'd like
I'd love new options to set a shortcuts that would simply move the current workspace to the monitor in a given direction.

@malcolmredheron malcolmredheron added the enhancement Adds a new feature or extends scope label Apr 11, 2024
@jtaala
Copy link
Collaborator

jtaala commented Apr 11, 2024

Hey @malcolmredheron,

I can definitely see the utility and use case for these shortcuts.

Any thoughts on what should be done in the case where there's only one space left on a monitor (and hence, can't really move to another monitor)? A couple of options:

  • do nothing (although that might be a bit confusing for users - e.g. "it's not working!");
  • do nothing but show a notification (either gnome notification or a small message in the corner saying something like "can't move as it's the last workspace on this monitor...");
  • fallback to swapping the space with the target monitor;

Thoughts?

Jay.

@malcolmredheron
Copy link
Author

Oh, hmm. I didn't know about that requirement. Is that a Gnome thing, or a Paper thing? Regardless, swapping in this case seems reasonable and like the simplest option.

@jtaala
Copy link
Collaborator

jtaala commented Apr 11, 2024

I guess it's more of a PaperWM thing. In PaperWM we have a "one workspace per monitor" paradigm (which interestingly is one of the top voted features for gnome). This does cause a few issues/hurdles as we're often fighting against Gnome's concept of "one workspace across all monitors".

In any case, it means that PaperWM needs at least one space (workspace) on each monitor. Swapping the space seems like a logical thing to do to maintain that. Will play around and put up a PR and branch for others' to test as well to see what works.

Jay.

@malcolmredheron
Copy link
Author

malcolmredheron commented Apr 11, 2024 via email

@jtaala
Copy link
Collaborator

jtaala commented Apr 13, 2024

Hey @malcolmredheron,

So, we can actually already do this (move workspaces, not swapping) but it's a two-step process. I was searching for a quick video and explanation I did a while back on this and found it today:

#571 (comment):

So you can actually move entire workspaces to other monitors quite easily (without messing with windows). Use workspace stack switching - bascially you switch to prev workspace (default key Super+`) - then go to the other monitor and do the same thing, which then switches that workspace to the new monitor.

1.mp4

@jtaala
Copy link
Collaborator

jtaala commented Apr 13, 2024

Anyways, what I'm implementing now is a simple shortcut to pretty much do this. At the time I called it workspace stack switching, but it's basically just moving a workspace out of view (which makes it available on other monitors).

In the video, I'm just using the default 3 finger swipe down for workspace stack switching.

@jtaala
Copy link
Collaborator

jtaala commented Apr 13, 2024

All,

I've put up a PR that implements this (and a few other things).

#825

Please try it out and let me know how it goes:

remove EGO version of PaperWM, then:

git clone https://github.com/paperwm/PaperWM.git
cd PaperWM
git checkout feature-move-space-to-monitor
./install.sh

Then login/logout and enable PaperWM like normal.

Thanks!

@jtaala jtaala closed this as completed in 033196b Apr 15, 2024
@malcolmredheron
Copy link
Author

Thank you! I'm on Nixos, which I generally love but by design makes it hard to monkey with my system, so I'll wait for the new version to get packaged up instead of figuring out how to install it manually. But I'm excited!

@jtaala
Copy link
Collaborator

jtaala commented Apr 16, 2024

Thank you! I'm on Nixos, which I generally love but by design makes it hard to monkey with my system, so I'll wait for the new version to get packaged up instead of figuring out how to install it manually. But I'm excited!

I'm not familiar with Nixos, but this has also now been released on https://extensions.gnome.org/extension/6099/paperwm/ (which most people use to install nowadays).

Also, I think Gnome Extensions app notifies of updates (from extensions.gnome.org) and updates extensions for you in most cases (just needed a logout/login).

Cheers.

@malcolmredheron
Copy link
Author

I figured out how to manually update Nix's gnome extensions and I have the new version running now. It's working great. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adds a new feature or extends scope
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants