marimo icon indicating copy to clipboard operation
marimo copied to clipboard

Support for XDG Base Directory specification

Open AliSPEDA opened this issue 7 months ago • 2 comments

Description

#2367 made configuration support XDG_CONFIG_HOME, which is great! On that PR there was a bit of talk of broader support for XDG Base Dirs, but I can't tell what the wish/plans are for this.

Currently I can see some state information (state.toml) in ~/.marimo, and this directory is probably also used for other files? (I recently deleted the directory in a clean up and have only used marimo a couple of times since)

Suggested solution

I would love if marimo respected XDG environment variables if set and otherwise fallback on ~/.marimo (or anything else is preferred). But will there be support for such a change? Would love to take a shot at a PR, if maintainers would like/accept such a change.

Alternative

No response

Additional context

https://wiki.archlinux.org/title/XDG_Base_Directory

AliSPEDA avatar Apr 17 '25 16:04 AliSPEDA

Thanks for opening this issue. We're open to it, but what specifically did you have in mind? Moving ~/.marimo/ to XDG_CACHE_HOME, or something else?

akshayka avatar Apr 17 '25 20:04 akshayka

(Switching to my private GitHub account, posted from work account by mistake 😅)

Yes, or whatever other XDG directory makes more sense. Currently I only have state.toml in there, with data that looks more cache like than state like.

But also if marimo writes any other file in ~/.marimo I think it should go to the right XDG directory (CACHE, STATE, DATA, CONFIG) if the XDG environment variables is set.

a-alak avatar Apr 18 '25 08:04 a-alak

I'd cast a vote for XDG_STATE_HOME

twio142 avatar Jun 04 '25 16:06 twio142