# Dotfiles Personal collection of (public) dotfiles, managed with [GNU Stow](https://www.gnu.org/software/stow/). ![A screenshot of the dotfiles in use](https://git.dyamon.me/dotfiles/plain/resources/screen.jpg?h=develop "A screenshot of the dotfiles in use") The following *configuration packages* are provided: `bash`, `fzf`, `mailcap`, `misc`, `mpd`, `mpv`, `ncmpcpp`, `neomutt`, `nnn`, `ripgrep`, `sxhkd`, `sxiv`, `tmux`, `transmission`, `vim`, `x11`. On top of this I'm using my own fork of st: - Official repo ([https://st.suckless.org/](https://st.suckless.org/)) - My personal fork ([https://git.dyamon.me/st.git](https://git.dyamon.me/st/)) If something does not work it is probably because you are not using this terminal emulator. Some packages depend on other and should be deployed together: - `vim` and `bash` are interdependent; - `vim` loosely depends on `ripgrep` and `fzf` for the [`fzf.vim`](https://github.com/junegunn/fzf.vim) plugin to work properly. It will fallback to Vim `find` command (`:h :find`) otherwise. `git` and `stow` are assumed to be installed on the machine. ## Organization Thanks to the *package* structure of Stow it is possible to group files in a logical way (in this case per program). Following this approach all config files related to Vim are in the `vim` folder and all Bash related config files are in the `bash` one. In some cases a file might be related to multiple programs (e.g. config files for package nnn might include same Bash related configuration). In these cases the file can be found in (what I consider) the most relevant package (in this example it is the nnn package). ### Additional configuration Package `vim` needs the following: ``` $ mkdir -p $HOME/.local/share/vim/{backup,sessions,swap,undo} ``` ### Private configuration I personally keep a separate repository with all my private configuration files, and you might want to do the same. This is organized with `stow` as well. Keep in mind that when using `stow` from multiple locations you might need the `--no-folding` flag to avoid clashes. ### Note on Stow In Stow 2.3.0, a new feature was introduced to better handle dotfiles. In particular any file or directory in the package tree that starts with the prefix `dot-` is substituted, during symlink creation, with an actual dot. This is to avoid having a package with a bunch of hidden files. Unfortunately the feature [doesn't work properly](https://github.com/aspiers/stow/issues/33) and in particular there is a bug that prevent to use the features for directories in the package tree. ## Installation Clone the repository in your `$HOME` directory and populate the submodules. ``` $ git clone --recurse-submodules https://git.dyamon.me/dotfiles .dotfile $ cd .dotfiles ``` Stow the packages you need. ``` $ stow ... ``` E.g., ``` $ stow bash vim ``` Check the manual for more details on how to use `stow` ``` $ man stow ``` If you want to preview what are the effects of the command without creating any symlink use the `--no` option. ``` $ stow --no --verbose=2 ``` To unstow a package use ``` $ stow --delete ``` To restow a package (to apply changes in the structure of the package) use ``` $ stow --restow ``` ## Different systems I currently tested this setup on the following systems without any issues: - Gentoo Linux - Manjaro Linux (so this will problably work on any Arch-based distro) - Termux (on my phone): + Install `ncurses-utils` + `/tmp/` needs write permissions or alternatilvely fallback to `~/.local/cache`