Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

pbar's dotfiles

~ is where the is

Alacritty tmux Zsh Starship Neovim

ci

Try it out!

You can demo my dotfiles by launching a shell in a throwaway container with this command:

docker run --rm -ith pbar-dotfiles ghcr.io/pbar1/dotfiles

Try things, like running base16_<tab> to change the shell theme!

Dependencies

  • git
  • zsh
  • starship

How it was created

git init --bare "${HOME}/.config/dotfiles.git"
alias dotfiles="git --git-dir=${HOME}/.config/dotfiles.git --work-tree=${HOME}"
dotfiles config --local status.showUntrackedFiles no
dotfiles remote add origin git@github.com:pbar1/dotfiles.git

How to clone

Checkout will refuse to overwrite existing files, so make sure to delete any first. From your home directory,

alias dotfiles="git --git-dir=${HOME}/.config/dotfiles.git --work-tree=${HOME}"
git clone --bare --recurse-submodules --jobs=8 https://github.com/pbar1/dotfiles.git "${HOME}/.config/dotfiles.git"
dotfiles checkout

Rationale & Components

This is a bare git repo in my home directory for tracking dotfiles. It conforms to the XDG directory standard.

Here are the components:

Terminal

Alacritty was chosen as the terminal for its simplicity and cross-platform support, as well as its performance. It supports Linux and macOS, the main operating systems I use.

tmux was chosen as the terminal multiplexer for its configurability and to augment Alacritty (which does not have tabs/windows).

Shell

Zsh was chosen as the shell for its wealth of features, community supported plugins that extend its usability, and POSIX compliance.

Sheldon was chosen as the plugin manager to use with Zsh due to its ease of use, and the fact thar Zinit has proven to be unreliable.

Starship was chosen as the prompt for simple configuration. It also works on many different shells, making the prompt easily portable.

Aliases & Functions

Custom functions are kept in ~/.local/bin as executable programs. This reduces dependence on a specific shell's features, allows use of other languages (ie, Python), and improves shell loading time (as they're just programs on the PATH).

Aliases are kept in ~/.config/sh/aliases.sh and are kept POSIX-compliant for reusability.

Abbreviations (enabled via a Zsh plugin) are kept in ~/.config/zsh/abbreviations, and only work when using Zsh.

Alternatives to Common Tools

Standard Preferred
ls exa
grep rg
find fd
sed sd
vim nvim
dig dog

TODO

  • Ignore changes due to toggling (starship toggle kubernetes)
  • Install script
  • Cross-platform config for Git credential helper
  • Cross-platform config for GPG pinentry
  • Conditionally load GPG agent only on platforms where needed
  • Re-think vanilli.sh, as it has some questionable opinions (bang-hist)