/dotfiles

Doom Emacs, a few-years old vim config, tmux, i3, zsh, polybar

Primary LanguageVim Script

Stow-based Dotfiles

These files are structured to take advantage of `GNU Stow` for installation and symlink handling. `stow foo` will create symlinks for everything in the `./foo` directory exactly one relative directory above the current working directory (`cwd`).

To install:

# ~/.zshrc
yay -S stow

This works well for dotfile management - you can create feature-based directories in `~/dotfiles` for things like `zsh`, `vim`, and `emacs`, then call `stow zsh` within `~/dotfiles` to take care of linking it to home (`~/`). Treat your `~/dotfiles/zsh` directory as if it is literally the home directory, i.e. you should have a `~/dotfiles/zsh/.zshrc`. Then, from your dotfiles repo, call `stow zsh`, and that’s it! Everything will have been symlinked properly.

This is convenient for me, as I can `stow i3` on machines that need it.

Note that dependencies are not covered by `stow` - it is a simple symlinking tool, so dependency management will require more digging.

Enable Hidden Files where relevant

The `stow` style leads to many “hidden” files being used, which revealed that many tools ignore hidden files by default.

Zsh fix

# ~/.zshrc
setopt globdots

Rip-grep (emacs) fix

Create `~/.ignore` file with `.git` (so that –hidden does not include .git). See this issue.

$ echo ".git" >> ~/.ignore

Update `rg` command in emacs to use `–hidden` flag:

(setq counsel-rg-base-command
    "rg -zS --hidden --no-heading --line-number --color never %s .")