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

Take focused window to new context, Remember renamed workspaces #5

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jooooscha
Copy link

Hey, I would like to revive this project and have started with two features.

First, I have implemented a minimal solution for #2. This can probably be extended to be more useful. Currently, it only supports taking a window with you when switching contexts. It does not support just sending a window to another context.
Also, I noticed a bug, which probably only occuers in combination with Smart Borders.
When taking a full screen window (so no borders) from context A to context B and the window is not full screen in context B, the borders are missing. A workaround is to switch to another context and then back.
I have tried refresh and rescreen but they don't solve this. I am not too deep into XMonad to tell how to solve this

Secondly, I am using NamedWindows, so I have implemented that the named workspaces are stored per context.
This should not influence the behavior when not using NamedWIndows, but this is untested.

I am happy to explain any part of the code, or change or remove parts from this PR.

PS: While trying to understand how this plugin works, I have renamed some variables. I think they are a bit easier to understand now, but if you want, I can change them back.

@Procrat
Copy link
Owner

Procrat commented Feb 21, 2023

Thanks for your interest in this plugin, @jooooscha! Great to see a PR! I'll have a closer look at your code when I find the time, but I'm afraid I can't make any promises time-wise.

@jooooscha
Copy link
Author

Did not realize that changes would be automatically reflected in this PR. Those three new commits are not directly related to the original feature (I think they are pretty cool, still :D).

Just for the protocol, they extend the original feature by fixed workspaces. The workspace switching functions can now be called with an array of workspace tags (not the names; when using named workspaces). Those workspace tags are now fixed and will not be switched to the new context. I am using this, for example, for my music player, to which I want direct access in all contexts.

Internally, the fixed workspaces will be copied to the new workspace at every switch. Therefore, one window can be on two contexts, and when deleting a context the window would also be killed on the current context. Therefore, I have also adapted the deleting function, to only kill windows not on a fixed workspace

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

Successfully merging this pull request may close these issues.

2 participants