Skip to content

connorjs/dotfiles

Repository files navigation

connorjs dotfiles

Mac and Windows. Multiple shells. Same tools. One install script.

Highlights

Mac

./install.sh

 Fish.  Kitty.  Homebrew.

Windows

./install.bat

Shell? Terminal?  Chocolatey?.

Nushell? PowerShell? Oh My Posh. Neovim.

Table of Contents

Important

I started working on new updates on Sep 23, 2023. Treat the README and install scripts as out-of-date until I remove this message. I have two goals for these updates in addition to syncing my latest settings and preferences.

  1. Windows compatibility
  2. Full system configuration (beyond the terminal)

Browse the last stable version.

About

Welcome to my dotfiles repo! You will find my public configurations including a single install script for each OS.

If you have any tips, tricks, or recommendations, I’d love to hear them! Cheers

Install

  1. Clone this repo
  2. Run the install script: ./install.sh for Mac and ./install.bat for Windows
  3. Edit .gitconfig (or use git config --global)
  4. Restart to see all changes
Shell commands
mkdir -p $HOME/w/connorjs && \
cd $HOME/w/connorjs && \
git clone https://github.com/connorjs/dotfiles.git && \
cd dotfiles && \
./install.sh && \
cd $HOME && \
vim .gitconfig

See § Workspaces for why I use the ~/w/connorjs path.

Terminal

I use Kitty (a fast, feature-rich, GPU based terminal emulator) with Selenized (Solarized redesigned) color schemes (Warm and Black). The on-dark-mode-change script syncs the Kitty theme with the System preference.

I have programmed the F6 media key to toggle between light and dark mode (the key has a moon on it; its original function is Do not Disturb).

Follow kitty-icon to change the macOS application icon.

Utilities

Homebrew installs the following utilities (listed alphabetically).

Name Description/reason
bat Cat clone with wings
cowsay For fun
curl Ensure latest version
fish Fish shell
fnm Fast node manager
git Ensure latest version
git-delta Syntax-highlighting pager (git diff)
imagemagick Converting and editing images
jq Command-line JSON processor
lsd LSDeluxe (includes --tree)
lolcat For fun
nvim Hyper-extensible Vim-based text editor
oh-my-posh Prompt theme engine for any shell
stow Symlink farm manager

See the Brewfile for the complete list including macOS apps.

Aliases

Includes a consistent configuration of aliases (abbreviations in fish) across multiple shells.

Git

Includes shell aliases inspired by gitalias.com, Nushell, Oh My Zsh, and a Fish shell git plugin. Mine do not match 1:1 in the same way that these do not match 1:1 to each other.

To ensure strong consistency across my own shell configurations, I hand-write all aliases instead of sourcing them. I also do not include aliases I never use (example: --signoff variations for git commit).

LSD

Includes various ls aliases: l, la, ll, lt, t, t3, and more.

File system

XDG base directory

$HOME/.config: I prefer to follow the XDG base directory specification where possible.

I need to figure out the Windows parallel. Maybe %APPDATA%?

The install script uses stow to link this repositories packages. For example, .vimrc ends up in $HOME and the init.vim script ends up in $HOME/.config/nvim as expected. Also see “Using GNU Stow to manage your dotfiles”.

The package names in this repository exist as preferred logical naming. Only this install script uses them; they do not appear in the target file system.

Workspaces

$HOME/w: Workspaces for code repositories. I name it w for brevity. If needed, create w on the appropriate drive and symlink to it from $HOME.

Namespacing: Regardless of tooling, I see namespacing for code repositories. GitHub has the user or organization, AWS has the account, and Azure DevOps has the project.

I match this namespacing with the first-level directory structure under w. For example, this repository will exist at $HOME/w/connorjs/dotfiles.

Note: I have considered having separate workspaces or another directory per tool. For example, ~/gh or ~/w/gh for GitHub. However, I have yet to hit conflicts that warrant this additional namespace scheme.

Acknowledgements

Attributions

OpenMoji

All emojis designed by OpenMoji – the open-source emoji and icon project. License: CC BY-SA 4.0.

See images/openmoji/LICENSE.md for details on modifications and ShareAlike redistribution.