stratagus icon indicating copy to clipboard operation
stratagus copied to clipboard

Move `~/.stratagus` elsewhere?

Open Barbaross93 opened this issue 3 years ago • 4 comments

Is it possible to define a custom location for ~/.stratagus? Personally, I prefer to keep my home directory as clean as possible. It looks like there's a -d flag that should do what I want, but all I see are messages related to not finding the game files. Am I missing something? Is there an environment variable I can set?

Barbaross93 avatar Jun 21 '22 18:06 Barbaross93

It's not possible to define a custom location for ~/.stratagus

timfel avatar Jun 21 '22 19:06 timfel

it probably should go into ~/.config/stratagus, i guess

timfel avatar Jun 21 '22 19:06 timfel

Bummer :(

Technically, if we're following proper XDG specifications, extracted game files should go in ~/.local/share/stratagus and any config files should go in ~/.config/stratagus. To be more correct, stratagus should look for $XDG_CONFIG_HOME and $XDG_DATA_HOME; falling back to the aforementioned directories if those variables are undefined.

Barbaross93 avatar Jun 21 '22 19:06 Barbaross93

thanks, the last time I checked how XDG specifies that was years ago and I had forgotten. It's only one place in the codebase, iirc, maybe I'll get to it sometime, or someone else will

timfel avatar Jun 21 '22 20:06 timfel

Fixed in master. Data is now extracted to XDG_DATA_HOME and savegames and config files are stored in XDG_CONFIG_HOME

timfel avatar Feb 24 '23 21:02 timfel