My dotfiles for Bash/Zsh, Vim/Neovim, Doom Emacs, tmux, Git, terminal emulators, JupyterLab, aria2, mpv, Nix and Homebrew
My dotfiles. Some of my considerations are explained in Wiki.
Deployment • Shell • Vim/Neovim • Doom Emacs • tmux • Git • Terminal emulators • Other config
More screenshots here.
chezmoi is used to bootstrap dotfiles.
Deploy with shell one-liner:
sh -c "$(curl -fsLS git.io/chezmoi)" -- init --apply g6ai
Uses text/template
syntax from Go extended with text template functions from sprig
.
For instance, here is a typical snippet in one of my dotfiles, init.vim.tmpl
, residing in private_dot_config/nvim
:
{{ $x := splitList "_" .chezmoi.sourceFile /* private dot config/nvim/init.vim.tmpl */ -}}
{{ $y := last $x | dir /* config/nvim */ -}}
{{ $rtp := list "~/." $y | join "" /* ~/.config/nvim */ -}}
{{ $vim_flag := .vim_flag -}}
{{ template "vim/vimrc" dict "rtp" $rtp "os" .chezmoi.os "vim_flag" $vim_flag -}}
It passes variables rtp
, os
and vim_flag
to a common vimrc
template in .chezmoitemplates/vim
. This vimrc
template contains both the actual config details and the logic operations which check the variables it receives on deployment, so it can generate different config per Vim variants (Vim or Neovim), OS (Linux or macOS) and other user-defined variables.
Such snippets are extensively used in these dotfiles to manage config files of different environments in one place (.chezmoitemplates
), keeping the resource-demanding logical operations at the deployment step rather than the runtime.
rc.sh
template is the runcom (run commands) file for both Linux and macOS.bashrc
template uses the rc.sh
template.zshrc
template uses the rc.sh
template, and utilizes Zim for fancy features.profile.sh
template is used in both dot_bash_profile.tmpl
and dot_zprofile.tmpl
.run_append_motd
is a Bash script to personalize motd, which is run by chezmoi..chezmoitemplates/vim
directory. They are then deployed to Vim and Neovim's runtime path.
vimrc.tmpl
template and Neovim's init.vim.tmpl
template use the versatile configs in vimrc
template, which works for Linux, macOS and Windows! You can set if your system is good enough to enable plugins on chezmoi deployment.vimrc
's functionalities are divided and located in core
directory.coc-settings.json
.tmux.conf
defines tmux's style and key bindings, etc. Access to system clipboard is supported:
executable_update_display_vim.sh
and executable_update_vim.sh
update environment variable $DISPLAY
and/or Vim/Neovim theme.Global dot_gitignore_global.tmpl
per OS template. GitHub’s collection of .gitignore
file templates are used.
From my experience, there's no perfect terminal emulator. I have tried Terminal.app, iTerm2, Alacritty, kitty and WezTerm. Currently I'm using WezTerm.
wezterm
folder includes the WezTerm configuration file wezterm.lua
.kitty
folder includes the kitty configuration file kitty.conf
for different OS.alacritty
folder includes the Alacritty configuration file alacritty.yml
for different OS.dot_jupyter
folder includes config files for JupyterLab configs. See config file and command line options of Jupyter Server for details.
jupytext.toml
is the config file for Jupytext.dot_aria2
folder includes config file for aria2. See options section of aria2 documentation for more options.mpv
folder includes config files for mpv. See mpv documentation for more options.darwin-configuration.nix
contains config of nix-darwin.Brewfile
contains config of the Homebrew Bundle bundler.