This is my collection of dotfiles. As with any open source software never blindly running anything that has not been properly understood and/or vetted. These settings should be considered unstable as I'm constantly tinkering with them. Rather than installing, I recommend forking and modifying it for your own use or using as a resource for your own configurations.
$ curl -s https://raw.githubusercontent.com/jawang35/dotfiles/master/bootstrap.sh | bash
bootstrap.sh script will:
- Clone the repository as a Git bare repository into ~/.dotfiles.
- Check out configuration files into the
$HOME
directory. - Install submodule dependencies.
- Install Homebrew packages and applications.
- Load .bash_profile.
Configuration files are managed using a Git bare repository (inspired by https://www.atlassian.com/git/tutorials/dotfiles). config
is an alias for git --git-dir=${HOME}/.dotfiles.git --work-tree=${HOME}
and is used to manage the repository.
To keep the $HOME
directory clean, configurations are stored in .config when possible. Local configurations and secrets are sourced from .local.
To update to latest:
$ config-update-all
- Bash - Default shell. All files found in .config/bash are loaded in both login and non-login shells. Local configs added to .local/bash will also be loaded. .config/inputrc improves Bash completion behavior and sets vi editing mode.
- Git - Version control. Configurations defined in .config/git. Dependencies managed as submodules.
- Hammerspoon - Key bindings for managing macOS applications/windows. See Hammerspoon.
- Homebrew - macOS package manager. bundler manages packages .config/Brewfile. Local package dependencies managed by
.local/Brewfile
if it exists. - Karabiner-Elements - Custom key mappings for macOS. See Karabiner-Elements.
- kitty - Full-featured GPU-optimized terminal emulator with a readable configuration file.
- tmux - Manages multiple terminal sessions, windows, and panes. Configured in .tmux.conf.
- Vim/Neovim - Configurations setup primarily for Neovim at .config/nvim. Compatibility with Vim is preserved by symlinking .vim and .config/nvim/vimrc, and by ignoring Neovim specific plugins.
I use the @sonph's onehalfdark theme with Source Code Pro Nerd Font Mono. My Bash prompt and tmux status bar have been inspired by the same theme. 24-bit and 256-color terminal emulators are supported.
Custom Karabiner-Elements key bindings configured in .config/karabiner on macOS:
- Ctrl (or Fn) with h, j, k, l for vi-like arrow movement.
- Simultaneous j+k to escape. ⇪ Caps Lock bound to Ctrl+⌥+⌘ to create a Hyper key for use with Hammerspoon.
- Ctrl+Delete mimics Fn+Delete (delete forward).
- Ducky (One 2/Mecha) Mini mappings to match Mac keyboard layout. VID/PID changed to work with macOS (https://twitter.com/i/status/1159519887527727106).
Lua scripts for Hammerspoon configuration. .hammerspoon/init.lua is the entrypoint that loads all the other modules.
Hyper key is defined as Ctrl+⌥+⌘ and is bound to ⇪ Caps Lock using Karabiner-Elements. Hyper+r reloads the Hammerspoon config.
The following application shortcuts are used:
Keys | Application |
---|---|
Hyper+` | Kitty |
Hyper+1 | Google Chrome |
Hyper+a opens the application mode. Esc closes the mode. With the mode open, the following keys launch or switch to the corresponding and close the mode:
Keys | Application |
---|---|
Hyper+m | Messages |
Hyper+o | Microsoft Outlook |
Hyper+p | 1Password |
Hyper+s | Slack |
The following window shortcuts are used:
Keys | Action |
---|---|
Hyper+f | Full Screen |
Hyper+c | Center |
Hyper+h | Left Half |
Hyper+j | Bottom Half |
Hyper+k | Top Half |
Hyper+l | Right Half |
Hyper+⇧+h | Left Screen |
Hyper+⇧+j | Lower Screen |
Hyper+⇧+k | Upper Screen |
Hyper+⇧+l | Right Screen |
Copyright (c) 2016 Jason Wang licensed under the MIT License.