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

[Question] Does this project handle the case of moving a window to the specified workspace? #76

Open
nlpsuge opened this issue Oct 10, 2020 · 3 comments

Comments

@nlpsuge
Copy link

nlpsuge commented Oct 10, 2020

Hi,

I'm writing a similar tool named xsession-manager in Python.

And I'm struggling deal with adding enough Workspaces before moving windows to the specified workspace where those windows stayed in last time when restoring.

I've asked many people including Florian Müllner from the Gnome Team. I learned from them that there no way to add Workspaces outside of Gnome Shell itself via some APIs.

Now I can add Workspaces via org.gnome.desktop.wm.preferences num-workspaces and org.gnome.mutter dynamic-workspaces, but it's not recommended.

How do you deal with this case?

@johannesjo
Copy link
Owner

Hi there! lwsm deals with it by moving the windows ins sequence. If you move a window to the current amount of workspaces +1 then a new workspace is created.

I wonder however why you want to rebuild this completely in Python. In case you want to extend the functionality, you can either extend on this module via a PR or include it in your own.

@nlpsuge
Copy link
Author

nlpsuge commented Oct 10, 2020

lwsm deals with it by moving the windows ins sequence. If you move a window to the current amount of workspaces +1 then a new workspace is created.

That 's great! I'll learn how this project handle it later. Maybe I'll ask you more questions.

I wonder however why you want to rebuild this completely in Python.

I write it in Bash at first perhaps before I know your project. The Bash version just works but is not flexible and difficult to extend. Some issues are not easy to be addressed.

Python is better than Bash to do this kind of work for me, I can add more features easily. I'm learning Python, so that project is also a practice.

In case you want to extend the functionality, you can either extend on this module via a PR or include it in your own.

I'll see what I can do. I know a little about js by the way.

@nlpsuge
Copy link
Author

nlpsuge commented Oct 11, 2020

If you move a window to the current amount of workspaces +1 then a new workspace is created.

I've tested. lwsm cannot move windows to the the current amount of workspaces +1 + N (N is equal to 1 or greater than 1).

Move windows to the last one of workspace, then check the amount and move again is a plausible way though... :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants