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

Allow caching to be controlled in the config file (and in a more fine-grained way) #85

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

Conversation

mark-cooke
Copy link
Contributor

Hi there @leukipp - Happy New Year! - I'd appreciate it if you'd accept all, or at least part of, this PR!

When starting up from a saved Desktop session:
Caching window positions has been unreliable for things like browser windows (e.g Firefox).
They will all have the same WM_CLASS and window title on start-up, updating multiple times thereafter, so will not match cortile's cached values when it sees them.
This means windows get placed on the wrong workspace, or worse, assumed to be on a workspace they are not so layouts end up with "holes" in them.

Disabling the cache entirely is an option but having the workspace tiling settings, proportions, etc remembered is a really nice feature that I don't want to have to lose.

This PR adds cache_workspaces and cache_windows to the config to individually control what gets cached, but still allow the command-line flag to override the settings and disable the cache entirely.

There's 2 commits in it:

  1. 72877b1 - Makes the 2 config values available in the config file.
  2. 6a4df90 - Make them optional, with defaults set into the config struct before decoding, to allow them to be left out.

…-grained way)

Add cache_workspaces and cache_windows to the config to individually control what gets cached, but still allow the command-line flag to override the settings and disable the cache entirely.
Why?
Caching window positions can be a bit unreliable for things like browser windows (which will all have the same WM_CLASS and window title on start-up so may not match between runs/logins when cortile encounters the window).
Most may not need these options so make thier presence in the
config file optional.
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