Giter Club home page Giter Club logo

Comments (7)

unixorn avatar unixorn commented on August 10, 2024 1

@deetuned I broke out yubikey ssh handling as #267.

from zsh-quickstart-kit.

unixorn avatar unixorn commented on August 10, 2024

Good idea. They started slowly accumulating. For backwards compatibility we should leave the local plugins in ~, everything else can go into ~/zqs-configuration

from zsh-quickstart-kit.

neiromaster avatar neiromaster commented on August 10, 2024

I could add migration. For example, if there is no end directory, then we have the old location of the settings and we can migrate everything. We would end up with just one check for this.

I was also thinking that we could add a coloring of the output to accentuate certain events for users.

from zsh-quickstart-kit.

deetuned avatar deetuned commented on August 10, 2024

I've actually been maintaining a fork since November that more or less does what @neiromaster is requesting. If the user has specifically gone out of their way to set $ZDOTDIR in ~/.zshenv and the fleet of $XDG_*_HOMEvariables, then all quickstart kit files (barring ~/.fzf/ and ~/.fzf.zsh) are decluttered from $HOME. If these variables are unset, then just operate on $HOME like before. Keeps everything simple and in plain site for new users who wouldn't have such variables set, while allowing powerusers to explicitly control their files.

Let's assume the user has set ZDOTDIR=~/.config/zsh, XDG_DATA_HOME=~/.local/share, and XDG_CACHE_HOME=~/.cache.

In ~/.config/zsh/:

  • .p10k.zsh
  • .zqs/
  • .zshrc.d/
  • .zshrc.pre-plugins.d/
  • .iterm2_shell_integration.zsh
  • .zcompdump* and .zcomp/ (completions)
  • .zcache/
  • .zgen-setup
  • .zsh_history
  • .zprofile (if needed for extra $PATH changes)1
  • .zsh_aliases
  • .zsh_functions

In ~/.config/zsh/.zqs/ (examples):

  • zsh-quickstart-kit-prompt-switch-warning
  • zsh-quickstart-last-update
  • zqs-settings/

In ~/.config/zsh/.zqs/zqs-settings/:

  • list-ssh-keys
  • load-ssh-keys2
  • Etc.

In ~/.cache/:

  • p10k-instant-prompt-*.zsh (instant prompt)

In ~/.local/share/:

  • .zqs-zgenom/
  • .zgenom/

The reason for organising where the quickstart kit's configurations are stored (and keeping zgenom, plugins and friends away from the configurations) is so that I can have any big or small change made to either the fork itself or my shell dotfiles (zsh, NeoVim, etc.) instantly and automatically propagate to every one of my machines

Unfortunately, I am by no means a trained developer. Most of the implementation relies on painfully simple abuse of ${ZDOTIDR:-$HOME}/<path>in all file checks or operations. Ideally, I'd define a variable in .zprofile or at the top of .zshrc that sets the required quickstart-kit-related directories with a few initial checks. And when operating on the ~/config/zsh/.zshrc.d/~/.config/zsh/.zqs/STUFF/~/local/share/.zgenom/etc. files, I'd check if we're using $ZDOTDIR and friends then remove the leading .s (or just set them at the top as well). The fork is just a personal hack. But I stumbled across this open issue and figured I'd engage in the discussion. I, too, would like it all to be just a little bit more organised.

Feel free to see the changes here, but please wear eye protection; it's dangerous in there: deetuned/zsh-quickstart-kit/tree/dev

P.S Thank you for all your hard work on this kit, @unixorn!

Footnotes

  1. When trying to prepend your $PATH in order to put custom- or user-installed search paths first, .zshrc.d won't cut it on macOS because it's loaded after .zshrc and as such Apple forces their directories at the start of $PATH. $ZDOTDIR/.zprofile is the only way I can override Apple's built-in shell commands/binaries.

  2. I added a check in the quickstart kit's .zshrc for the load-ssh-keys setting. If the setting is false, then don't load keys using ssh-add. GNU doesn't have --apple-load-keychain and I use gpg-agent with a YubiKey anyway.

from zsh-quickstart-kit.

deetuned avatar deetuned commented on August 10, 2024

@deetuned I broke out yubikey ssh handling as #267.

That was incredibly quick, and greatly appreciated!

Cheers! :)

from zsh-quickstart-kit.

neiromaster avatar neiromaster commented on August 10, 2024

@unixorn, how would you feel about me using @deetuned's suggested folders to store zqs configuration?

from zsh-quickstart-kit.

unixorn avatar unixorn commented on August 10, 2024

I think it'd be a good idea. I haven't had time to start work on it, so if you do, go ahead. Make it default to using ~ so we don't break existing installs, and there should be a zqs command to migrate the settings to the new directory structure.

I'm going to add a bin dir to store one-use commands like that so that they can be standalone scripts and not add to the size of .zshrc and increase start time for new sessions.

from zsh-quickstart-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.