Skip to content

It would be more appropriate to store state in ~/.local/state than ~/.config #18

Open

Description

@bentorkington

Describe the bug
basilk stores its app state in XDG_CONFIG_HOME instead of XDG_STATE_HOME, which would be more appropriate

To Reproduce
Steps to reproduce the behavior:

  1. Start the app, create a task

Expected behavior
Task data is stored in ~/.local/state/baslik

Additional context
Task data is store in ~/.config

Activity

  1. bentorkington commented on Feb 14, 2025

    @bentorkington
    Author

    in dirs lingo, this is state_dir: (https://docs.rs/dirs/5.0.1/dirs/fn.state_dir.html)

  2. janTatesa commented on Feb 26, 2025

    @janTatesa

    Agree

  3. GabAlpha commented on Mar 16, 2025

    @GabAlpha
    Owner

    Agreed, thanks! About the suggestion: what's the distinction between ~/.local/state and ~/.local/share ?
    I'm looking at the dirs documentation for state_dir and see it only mentions a path for Linux. Is there a default for other operating systems, or will I need to handle them specifically, maybe with a switch case?

  4. bentorkington commented on Mar 16, 2025

    @bentorkington
    Author

    This page might help: https://wiki.gentoo.org/wiki/XDG/Base_Directories

    Indeed, ~/.local/share may be a better choice than ~/.local/state.

    I suspect the dirs documentation is simply incomplete regarding paths, and as long as you're using the dirs module correctly it'll get it right.

  5. GabAlpha commented on Mar 16, 2025

    @GabAlpha
    Owner

    Great, I'll try to do some tests

  6. added this to the 0.3.0 milestone on Mar 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions