Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclutter $HOME #200

Open
roadkell opened this issue Jun 25, 2022 · 1 comment
Open

Unclutter $HOME #200

roadkell opened this issue Jun 25, 2022 · 1 comment

Comments

@roadkell
Copy link

Feature Request

Is your feature request related to a problem? Please describe

The kit, together with zsh, intstalls/requires quite a lot stuff at $HOME:
Dirs: zgenom, zsh-quickstart-kit, .fzf, .zgenom, .zqs-settings, .zsh, .zshrc.d, .zshrc.pre-plugins.d.
Files: .fzf.zsh, .p10k.zsh, several .zcompdump* files, .zsh-history, .zsh-quickstart-last-update, .zsh-quickstart-local-plugins.
Symlinks: .zgen-setup, .zsh_aliases, .zsh_functions, .zshrc.

Describe the solution you'd like

Unclutter $HOME by following XDG dir specification where possible.

Describe alternatives you've considered

Moving and symlinking stuff by hand, but that's obviously tedious and probably incompatible with auto-update. Symlinks would still clutter $HOME.

Additional context

zsh files paths (.zshrc, .zcompdump*, etc.) are semi-hardcoded by default, but can be put in more appropriate paths, as explained on ArchWiki. Which means that zqs install script should account for the possibility of altered paths and, ideally, allow user to alter them post-install without breaking the kit.

@unixorn
Copy link
Owner

unixorn commented Jun 27, 2022

Given that the target audience of the kit is new ZSH users, to avoid confusion I think that the kit should keep using ~ by default until and unless the user explicitly sets $XDG_CONFIG_HOME. I don't want to force someone who may be new to using a terminal and/or ZSH to have to figure out alternate dotfile locations before being able to use the kit - one of my goals for the kit is that a new user should be able to get it up and running in less than five minutes after they clone the repository.

All that said, I think it'd be a good idea to honor $XDG_CONFIG_HOME when it is present in the user's environment and update the kit to check to see if $XDG_CONFIG_HOME is set, and when it is, look for .zqs-settings, .zshrc.d and the other quickstart-created files/directories in there. Users expect to find dotfiles in~ and is where most resources will tell them to find them, so I'm going to keep that as the default location.

.fzf and .zgenom are created by upstream dependencies and I'm not going to try and update those locations - I want people to be able to use upstream documentation easily

I'm pretty busy for the next couple of weeks, but I'd definitely be willing to merge a PR that implemented it in a backwards-compatible fashion - not breaking existing users is high priority when making changes to the kit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants