gitui icon indicating copy to clipboard operation
gitui copied to clipboard

Feat/respect xdg spec on all os

Open KlassyKat opened this issue 8 months ago • 2 comments

This Pull Request fixes/closes #1498.

It changes the following:

  • Unifies OS logic for loading config.
  • Adds a ordered list of locations to search for config.
  • List includes XDG_CONFIG_HOME as the first priority.
  • Implements the same logic for getting the cache_path with XDG_CACHE_HOME as the top priority
  • No longer creates an empty gitui config folder by default.

I followed the checklist:

  • [x] I added unittests
  • [x] I ran make check without errors
  • [x] I tested the overall application
  • [x] I added an appropriate item to the changelog

KlassyKat avatar Apr 29 '25 10:04 KlassyKat

No longer creates an empty gitui config folder by default.

I'm a little trepidatious about this particular change since I am not certain there is no logic relying on a config folder existing; though as far as I can tell there isn't.

If it doesn't present any issues (or even if it does present minor issues) I am a strong advocate for not forcing an empty gitui config folder to exist for any users that don't feel any need to configure gitui. I see this as an extremely annoying UX for anyone that doesn't want/feel the need for any configuration of gitui and likes to keep their dotfiles clean.

For an app as functional as gitui out of the box I don't see the portion of users who don't feel the need for any additional config as a particularly small group.

KlassyKat avatar Apr 29 '25 11:04 KlassyKat

Could also add a $GITUI_CONFIG_DIR env var to look for at the top of the priority list, but I see that as maybe a bit overkill for what is a relatively simple config structure.

KlassyKat avatar Apr 29 '25 11:04 KlassyKat