Skip to content

Conversation

mochaaP
Copy link

@mochaaP mochaaP commented Apr 12, 2024

Notice: this is a breaking change. Users need to move their files from .praat-dir to .config/praat.

@mesaprotector
Copy link

Would be nice to get this in. I imagine it hasn't been merged because it's a breaking change - could melder_files.cpp be made to check for an existing ~/.praat_dir before creating the preferences directory in the new location?

@PaulBoersma
Copy link
Member

Mmm, none of the 11 Linuxes that I tried have the XDG_CONFIG_HOME variable set, but many of them have a $HOME/.config folder in which we find folders like gnome and pulse and gtk-3.0. So I guess that $HOME/.praat-dir should be moved to $HOME/.config/praat in those cases, is that right? The change indeed breaks something, but we have to do something similar for Windows (moving to AppData/Roaming). So this will make a chance for Praat version 7, to be published in November 2024. The XDG setting will then also be easy to implement, although I hope that I can hope that this setting will not change during the user's lifetime on the computer.

@mesaprotector
Copy link

$HOME/.config is indeed the default for $XDG_CONFIG_HOME, but the variable can be changed. I wouldn't recommend hardcoding it in the new location either, but maybe look at what other C++ applications do.

@thatfloflo
Copy link

The XDG Base Directory Specification suggests that $HOME/.config is the default, unless $XDG_CONFIG_HOME is set and points somewhere else:

$XDG_CONFIG_HOME defines the base directory relative to which user-specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.

(For Windows, from Vista onward, %AppData% should always be set as far as I know, currently pointing to the %UserProfile%\AppData\Roaming directory by default)

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.

4 participants