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

Move state.yml to $XDG_STATE_HOME/lazygit/state.yml #2794

Closed
adriel-tech opened this issue Jul 19, 2023 · 6 comments
Closed

Move state.yml to $XDG_STATE_HOME/lazygit/state.yml #2794

adriel-tech opened this issue Jul 19, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@adriel-tech
Copy link

Is your feature request related to a problem? Please describe.

When using a dotfile manager like stow I end up moving state.yml between my many machines
and state.yml seems like something that should be specific to each machine.

Describe the solution you'd like

Move state.yml to $XDG_STATE_HOME/lazygit/state.yml
Which defaults too '~/.local/state/lazygit/state.yml' other programs such as neovim do this as an example.

Describe alternatives you've considered

The ability to disable state.yml or the ability to set its location in config.yml.

@zhongdai
Copy link

I got the same problem, the state file should not live together with the config file.

@stefanhaller
Copy link
Collaborator

@adriel-tech @zhongdai This should be fixed by #2936, could you test that please?

stefanhaller added a commit that referenced this issue Feb 18, 2024
@wiraki
Copy link

wiraki commented May 22, 2024

Hello, I am confused. I see #2936 has been merged, but I still have the state.yml in my $XDG_CONFIG_HOME.

@stefanhaller
Copy link
Collaborator

The new code looks for the file in a few places, including where it used to be. When it finds it in any of them, it writes it back to the same location. This was a deliberate decision, here's some discussion about it.

If you want it in the new place, you'll have to move it there manually (or delete it from the old place if you don't care about what's stored in it, it will be recreated in the new place then).

@wiraki
Copy link

wiraki commented May 22, 2024

Thanks, that's cleared it! I peeked at that discussion but missed that part.

Edit: This can then be closed, I presume?

@stefanhaller
Copy link
Collaborator

Fixed by #2936.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants