i3-cycle-focus: persist state across restarts#193
Open
laur89 wants to merge 2 commits intoaltdesktop:masterfrom
Open
i3-cycle-focus: persist state across restarts#193laur89 wants to merge 2 commits intoaltdesktop:masterfrom
laur89 wants to merge 2 commits intoaltdesktop:masterfrom
Conversation
- these track window lists (and indices) per output and per workspace respectively. note this deviates from the as-is functionality, where there was only a single global window list. these new options essentially scope the alt-tabbing to specific areas. - existing options are backwards-compatible.
- simplify state data - index & window list always dicts. - persist in-memory state into a tempfile at i3 restart, and read it back in on server startup. - import some server-only deps only when server is launched, ie those imports are now ignored when called with --switch option - allow larger window stacks - even with lower --history values, still allow window stack length/size to be WIN_HISTORY + 5; this is to cover cases where a/multiple window(s) are closed; as it stands, closing a window in a stack would result in temporary gap in usage, until user focuses new windows. with this change, assuming older windows have been added to the stack, they would become accessible again if some window(s) from the front of the stack are closed/removed.
laur89
commented
Jun 8, 2022
| return w_set | ||
| else: | ||
| return set(w.id for w in tree.leaves()) | ||
| return set(w.window for w in tree.leaves()) |
Author
There was a problem hiding this comment.
Note we track window property instead of id, as former stays constant across i3 restarts.
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.
Note this should be merged after #191