dotfiles
dotfiles copied to clipboard
My dotfiles for Bash/Zsh, Vim/Neovim, Doom Emacs, tmux, Git, terminal emulators, JupyterLab, aria2, mpv, Nix and Homebrew
Dotfiles
My dotfiles. Some of my considerations are explained in Wiki.
Deployment • Bash • Zsh • Vim/Neovim • Doom Emacs • tmux • Git • Terminal emulators • Other config

More screenshots here.
Features
Deploy with ease and efficiency
chezmoi is used to bootstrap dotfiles.
-
Deploy with shell one-liner:
sh -c "$(curl -fsLS git.io/chezmoi)" -- init --apply g6ai -
Uses
text/templatesyntax from Go extended with text template functions fromsprig.For instance, here is a typical snippet in one of my dotfiles,
init.vim.tmpl, residing inprivate_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,osandvim_flagto a commonvimrctemplate in.chezmoitemplates/vim. Thisvimrctemplate 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.
Bash
shrc.shtemplate configures terminal color for Linux and macOS respectively. It also configures highlighting of less pager. It is then sourced bybashrctemplate.run_append_motdis a Bash script to personalise motd, which is run by chezmoi.
Zsh
dot_zshrc.tmpltemplate contains common settings from Bash, while utilising Zim for fancy features.
Vim/Neovim
- The configs are located in the
.chezmoitemplates/vimdirectory. They are then deployed to Vim and Neovim's runtime path.- Vim's
vimrc.tmpltemplate and Neovim'sinit.vim.tmpltemplate use the versatile configs invimrctemplate, which works for Linux, macOS and Windows! You can set if your system is good enough to enable plugins on chezmoi deployment. - Most of the
vimrc's functionalities are divided and located incoredirectory.
- Vim's
- Neovim-specific config:
- Adopts the mighty coc.nvim. Its config is
coc-settings.json. - Some experimetal features in Neovim 0.5+ are also embraced:
- nvim-treesitter, provides beautiful code highlighting and more.
- telescope.nvim, next generation fuzzy finder.
- Adopts the mighty coc.nvim. Its config is
Doom Emacs
- Configs for org-journal and Org-roam, to cooperate with beorg.
tmux
dot_tmux.confsources tmuxline.vim configuration if exists. The configuration defines vi key bindings. Access to system clipboard is supported:- For macOS, pbcopy is used. pbcopy is installed on macOS by default.
- For Linux, xclip is used. xclip needs to be installed. Within an SSH session, primary and/or clipboard content on the remote server can be sent to local machine by X11 forwarding.
- Helper scripts
executable_update_display_tmuxline.shandexecutable_update_tmuxline.shupdate environment variable$DISPLAYand tmuxline for various scenarios.
Git
Global dot_gitignore_global.tmpl per OS template. GitHub’s collection of .gitignore file templates are used.
Terminal emulators
From my experience, there's no perfect terminal emulator. I have tried Terminal.app, iTerm2, Alacritty, kitty and WezTerm. Currently I'm using WezTerm.
weztermfolder includes the WezTerm configuration filewezterm.lua.kittyfolder includes the kitty configuration filekitty.conffor different OS.alacrittyfolder includes the Alacritty configuration filealacritty.ymlfor different OS.
Other config
dot_jupyterfolder includes config files for JupyterLab configs. See config file and command line options of Jupyter Server for details.jupytext.tomlis the config file for Jupytext.
dot_aria2folder includes config file for aria2. See options section of aria2 documentation for more options.mpvfolder includes config files for mpv. See mpv documentation for more options.- macOS package manager:
darwin-configuration.nixcontains config of nix-darwin.Brewfilecontains config of the Homebrew Bundle bundler.