An image and texture viewer for tga, png, apng, exr, dds, pvr, ktx, ktx2, astc, pkm, qoi, gif, hdr, jpg, tif, ico, webp, and bmp files. Uses Dear ImGui, OpenGL, and Tacent. Useful for game devs as it displays information like the presence of an alpha channel and querying specific pixels for their colour.
Packaged builds like snap / dep define where things should go... basically not sure how relevant XDG is for, say, building a snap.
For dev installs I really want to NOT pollute the global system at all. That is, it should not interfere with any installed version of tacent view.
the XDG data dir probably isn't needed by tacent view. Ironically that seems to be the only XDG env var set in WSL. In Ubuntu I basically only see XDG_DATA_DIRS and XDG_RUNTIME_DIR as being set.
Tacent view needs 3 location to be set correctly:
1) A place for the config file. This should go in XDG_CONFIG_HOME. If that's not set it should choose the first dir in the colon delimited XDG_CONFIG_DIRS. If that's not set it should default to $HOME/.config/tacentview/
The specification seems inconsistent to me: It says "If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used." OK. Later it says: "The base directory defined by $XDG_CONFIG_HOME is considered more important than any of the base directories defined by $XDG_CONFIG_DIRS". Also OK. But it also says: "If $XDG_CONFIG_DIRS is either not set or empty, a value equal to /etc/xdg should be used." Here's the problem: if XDG_CONFIG_HOME is empty we should use $HOME/.config, but then we would never use XDG_CONFIG_DIRS. So I assume the intention is if XDG_CONFIG_HOME is empty, we should start parsing XDG_CONFIG_DIRS. If THAT is empty it says to use /etc/xdg. If I'm supposed to put my config file there (assuming XDG_CONFIG_DIRS is empty too), it will never use the default for XDG_CONFIG_HOME which is HOME/.config. That's a different loaction. In short, if both are not set, which default is supposed to be used to write the config file to?
2) A place for static data (not user created) that 'come with' the app. This seems out of the scope of the specification.
3) A place to store transient cache data (like generated thumbnails). This should go in XDG_CACHE_HOME and if not set $HOME/.cache (/tacentview)
In any case, we should retire $HOME/.tacentview
However we will still need to search it first for compatibility with previous installs. If a config is not found in the dirs specified by 1) it shoud look in .tacentview. If one is found there it should immediately resave it to the proper place determined by 1). The user can then manuallt remove .tacentview at their leisure since it won't be read again.
The specification is here: https://specifications.freedesktop.org/basedir-spec/latest/
Packaged builds like snap / dep define where things should go... basically not sure how relevant XDG is for, say, building a snap. For dev installs I really want to NOT pollute the global system at all. That is, it should not interfere with any installed version of tacent view.
the XDG data dir probably isn't needed by tacent view. Ironically that seems to be the only XDG env var set in WSL. In Ubuntu I basically only see XDG_DATA_DIRS and XDG_RUNTIME_DIR as being set.
Tacent view needs 3 location to be set correctly:
1) A place for the config file. This should go in XDG_CONFIG_HOME. If that's not set it should choose the first dir in the colon delimited XDG_CONFIG_DIRS. If that's not set it should default to $HOME/.config/tacentview/ The specification seems inconsistent to me: It says "If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used." OK. Later it says: "The base directory defined by $XDG_CONFIG_HOME is considered more important than any of the base directories defined by $XDG_CONFIG_DIRS". Also OK. But it also says: "If $XDG_CONFIG_DIRS is either not set or empty, a value equal to /etc/xdg should be used." Here's the problem: if XDG_CONFIG_HOME is empty we should use $HOME/.config, but then we would never use XDG_CONFIG_DIRS. So I assume the intention is if XDG_CONFIG_HOME is empty, we should start parsing XDG_CONFIG_DIRS. If THAT is empty it says to use /etc/xdg. If I'm supposed to put my config file there (assuming XDG_CONFIG_DIRS is empty too), it will never use the default for XDG_CONFIG_HOME which is HOME/.config. That's a different loaction. In short, if both are not set, which default is supposed to be used to write the config file to?
2) A place for static data (not user created) that 'come with' the app. This seems out of the scope of the specification.
3) A place to store transient cache data (like generated thumbnails). This should go in XDG_CACHE_HOME and if not set $HOME/.cache (/tacentview)
In any case, we should retire $HOME/.tacentview However we will still need to search it first for compatibility with previous installs. If a config is not found in the dirs specified by 1) it shoud look in .tacentview. If one is found there it should immediately resave it to the proper place determined by 1). The user can then manuallt remove .tacentview at their leisure since it won't be read again.