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

i3-cycle-focus: persist state across restarts #193

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

Conversation

laur89
Copy link

@laur89 laur89 commented Mar 30, 2022

Note this should be merged after #191

- 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.
return w_set
else:
return set(w.id for w in tree.leaves())
return set(w.window for w in tree.leaves())
Copy link
Author

@laur89 laur89 Jun 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note we track window property instead of id, as former stays constant across i3 restarts.

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.

1 participant