All of my Linux config files. Easy installation and maintenance with Git bare repository.
I use Linux distributions daily for both personal and work related things. Over the years I have customized Linux CLI tools to my liking. This repository has my config files for the following programs:
- Alacritty
- Zsh with Prezto configuration framework and Powerlevel10k prompt
- Tmux with TPM plugin manager
- Neovim / Vim with vim-plug plugin manager
- Catppuccin: Alacritty, Tmux, Neovim
- Qogir: GTK desktop environment
- Qogir Icon: Desktop environment icons
Git has a feature called "bare repository". You can place git-dir
(contents of .git) and work-tree
on different
paths. I setup a Bare repository in any folder. When I'm working on my dotfiles repo I use an alias which sets
--git-dir
to the bare repository and --work-tree
to my home directory.
So I can access my dotfiles repo from any directory without the need to cd
first.
-
Fork the repo.
-
Copy HTTPS or SSH clone link of your fork.
-
Prepare dotfiles directory.
-
Initialize bare Git repository.
git init --bare $HOME/.dotfiles
-
Add an alias to
.bashrc
or.zshrc
(if you use Zsh as shell).alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' alias config-edit="(export GIT_DIR=$HOME/.dotfiles; export GIT_WORK_TREE=$HOME; nvim)"
-
Configure local Git settings for the repository.
config config --local status.showUntrackedFiles no config config --local core.worktree $HOME
-
Set your fork as remote repository. I used my repo's HTTPS clone link in this example. You should use the link you copied.
config remote add origin https://github.com/arensonzz/dotfiles.git
-
-
Pull dotfiles from repo
config pull origin master config submodule update --init --remote --recursive
-
Use
config
alias instead ofgit
while working with your dotfiles.config status config add ~/.bashrc config commit -m "Modify bash config" config add ~/.zshrc config commit -m "Modify zsh config" config push origin master
-
You can use the
config-edit
alias which opens upNeovim
editor with correct Git env variables set so you can use tools likevim-fugitive
to stash changes, commit, etc. -
There is also
config-fzf
script which passes file paths in dotfiles as input tofzf
. So you can list files, select one or more file and use returned file list with other programs.nvim -O $(config-edit)