I use homeshick for dotfile management, with my castles stored on GitHub (https://github.com/stars/yut23/lists/homeshick-castles).
I'm using GRML's zshrc as a base, with some minor modifications (mostly stripping out stuff I don't use).
The original file layout was inspired by https://github.com/seebi/zshrc, but has evolved considerably since I first started.
Common config files are stored in ~/.zsh/
, while host-specific ones are in ~/.zsh/$system_name/
and are sourced immediately after the corresponding common ones.
- ~/.zshrc.pre
- extracts autotmux overrides out of
$TERM
(used later in~/.zshrc.local
, set by https://github.com/yut23/ssh-ident) - adjusts GRML settings
- loads Zinit
- patches
@zinit-scheduler
to remove the chpwd hook - ~/.zshrc (GRML)
- ~/.zshrc.local
- sets
$HOSTNAME
, with an optional override in~/.hostname
- sources
~/.zsh/system_name.zsh
to set$system_name
, which determines what system I'm on for all host-specific configuration - sources
~/.zsh/paths.zsh
and~/.zsh/$system_name/paths.zsh
- sources
~/.zsh/$system_name/modules.zsh
if present and modules haven't been loaded before (modules.zsh
can clear the loaded flag if needed) - sources
~/.tmux/autotmux.zsh
, which will exec into a shared tmux session if connected through ssh (or explicitly requested) - loads homeshick
- sources all the other config files
- paths.zsh (loaded above)
- sets up
$PATH
- modules.zsh (loaded above)
- loads any environment modules needed
- env.zsh
- aliases.zsh
- history.zsh
- misc.zsh
- plugins.zsh
- zinit
- prompt
- keys.zsh
- private.zsh
conda init
andmamba init
code goes in per-systempaths.zsh
- activating the default environment is handled in
plugins.zsh