Use workspace idx/name and output to restore windows instead of workspace id#2
Open
fmuehlis wants to merge 1 commit intoMTeaHead:mainfrom
Open
Use workspace idx/name and output to restore windows instead of workspace id#2fmuehlis wants to merge 1 commit intoMTeaHead:mainfrom
fmuehlis wants to merge 1 commit intoMTeaHead:mainfrom
Conversation
…t` to restore windows to the correct monitor and workspace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi! I really like the idea of this project and I have been using it for a few weeks now. However, I noticed that windows will not always be spawned on the correct workspace, but seemingly on random workspaces. I've read through the code and saw that windows currently get restored by workspace id. Sadly workspace IDs are not really consistent and the same workspace index on the same output can have different IDs when created and deleted multiple times.
So I propose this solution to recreate windows per monitor and workspace. The current solution prefers the workspace name over the workspace index on a given monitor because it is possible for named workspaces to have different indices too (e.g. there can be workspace 1 before a named workspace shifting the index of each workspace). To get the
MoveWindowToMonitorfunctionality I had to bump theniri-ipcdependency version.This is only supposed to be a draft and a proof of concept, as I would like to hear your thoughts on it hence the two TODOs in the code. If this is something you would be interested in I will refine this PR and test it more thoroughly.