My lovely dotfiles, managed with git bare repository, adhering XDG Base Directory as much as possible.
-
ZSH config
- zinit config
-
Git config
-
Misc config
- alacritty config
- bat config
- tealdeer config
- k9s config
- i3 config
-
Scripts for provisioning & installation of some packages
-
Create a dotfiles folder to track dotfiles
export XDG_DATA_HOME="$HOME/.local/share" git init --bare "$XDG_DATA_HOME/dotfiles"
-
Add an alias
dotfiles
to your.zshrc
export XDG_DATA_HOME="$HOME/.local/share" alias dotfiles="git --git-dir=$XDG_DATA_HOME/dotfiles/ --work-tree=$HOME"
-
Set git status to hide untracked files
dotfiles config --local status.showUntrackedFiles no
-
Add files & commit
dotfiles status # add .zshenv dotfiles add $HOME/.zshenv dotfiles commit -m "feat: add .zshenv" # add git config dotfiles add $HOME/.config/git/* dotfiles commit -m "feat: add git config files" dotfiles remote add origin git@github.com:kirintwn/dotfiles.git dotfiles push origin main
-
Prerequisites:
curl
wget
git
svn
unzip
GnuPG
zsh
python
lua
nodejs
bat
eza
fd
ripgrep
fzf
delta
-
Installation:
-
you can install some prerequisites & optional packages via
scripts/install-packages/paru.sh
if you are using Arch-based distros, orscripts/install-packages/brew.sh
if you are using MacOS. -
Clone & checkout
You can use
scripts/provisioning/setup.zsh
bycurl -sL https://raw.githubusercontent.com/kirintwn/dotfiles/main/scripts/provisioning/setup.zsh | zsh
or clone manually using the commands below:
export XDG_DATA_HOME="$HOME/.local/share" alias dotfiles="git --git-dir=$XDG_DATA_HOME/dotfiles/ --work-tree=$HOME" git clone --bare git@github.com:kirintwn/dotfiles.git "$XDG_DATA_HOME/dotfiles" # please remove all conflict files in $HOME before running dotfiles checkout dotfiles checkout dotfiles config --local status.showUntrackedFiles no
-
Open a new zsh shell, wait
zinit
provisioning (would take a few minutes). -
Create some directories for some program to use XDG base directory, please see
scripts/provisioning/setup.zsh
as a reference.
-
-
Some packages will failed to write config / data if the target directory not exists. Please see comments in
.zshenv
to provision those directories or runscripts/provisioning/setup.zsh
. -
If some environment variables are not loaded in
~/.zshenv
, by copying the file usingsudo cp ~/.zshenv /etc/zsh/zshenv # (or /etc/zshenv for MacOS)
may solve the problem.