These are my public configuration files, shell scripts, and more. I'm sharing them for the benefit of others, and I sincerely hope others find them useful.
My shell scripts are well-documented, and readers may also be interested in my methods of organization, my Bash functions, my Neovim configuration, my tmux configuration, and my Git configuration, among other things.
In general, shell scripts that might be useful to others are stored in the bin directory, whereas Bash utilities that are specific to my setup or reflect my personal preferences are written as Bash functions and stored in the .config/bash/init/functions directory.
I'm very pleased with the organization of my Bash functions. I've tried many methods of organizing aliases and functions, but this method, inspired by fish, feels the most natural. No aliases are used. Everything is a function, and every function has its own file.
One weakness with the organization of my Bash configuration is that loading an interactive shell is pretty slow, relative to loading an unconfigured Bash session, taking about 1-2 seconds on my laptop. That poor performance may have something to do with how many files need to be read, although a quick experiment in concatenating the files did not seem to speed things up dramatically. Some day, if it becomes a real problem, I could look into adding a build step for the Bash configuration that concatenates and/or minifies all text into a single .bashrc file. For now, it's not worth the effort. Waiting two seconds for a Bash shell to load is never a meaningful bottleneck for me.
To ask questions or discuss these files, please use the Discussions page.
Follow these steps to install all of these files:
- Install docopts. Shell scripts (files in the bin directory) require docopts and will not function without it.
- Install vcsh.
- Run
vcsh clone https://github.com/openjck/dotfiles.git dotfiles-openjck
.
- A warning will appear, but it can be safely ignored.
- If you prefer cloning over SSH for any reason, you can alternatively run
vcsh clone [email protected]:openjck/dotfiles.git dotfiles-openjck
.
- Run
rm -f "${XDG_CONFIG_HOME:-~/.config}/vcsh/repo.d/dotfiles-openjck.git/info/exclude"
. - Run
vcsh dotfiles-openjck fetch
. - Run
vcsh dotfiles-openjck switch main
.
- A warning about conflicting files may appear. If you'd like to keep the existing files that are named, either to use them as-is or merge them with the files from this project, move them somewhere else for now, then run this command again. If you don't care about the existing files, remove them, then run this command again.
- Log out, then log back in.
- This will cause the new .profile file to take effect. There are faster ways to accomplish this, but logging out and logging back in is the easiest and most comprehensive.
- Run
vcsh upgrade dotfiles-openjck
.
- This runs this project's setup script. The setup script will also run when
vcsh pull
is run, but not whenvcsh dotfiles-openjck pull
is run. I don't think it's possible to configure vcsh to run any hook like this whenvcsh dotfiles-openjck [subcommand]
is run.
See the shell script documentation for information on how to install a single shell script.
See the shell script documentation for information on how to use shell scripts.