My dotfiles are optimized to use the mouse as little as possible and to make navigating the terminal as pleasant as possible on macOS. Relying on Nix, the philosophy is to only have "general" tools installed machine-wide and install project-specific tools using that project's flake.
Highlights:
- Nix, nix-darwin and home-manager
- Alacritty
Hasklig- Monaspace Ne
- Tmux + Neovim integration (navigate using
ctrl-hjkl
between tmux/nvim panels) - Karabiner and Hammerspoon (map
caps-lock
toesc
, move/resize windows, quick shortcuts)
- Installation
- Usage
make install
make darwin-switch
make post-setup
To start a tmux session:
tl dot
tl
is an alias for tmuxp load (defined in modules/zsh/aliases.nix
), dot
stands for dotfiles session config file located at modules/tmux/tmuxp/dot.yaml
.
Use Prefix+s
to switch between running sessions using fzf.
ctrl-b c
to create a new tabctrl-b -
to split verticallyctrl-b |
to split horizontallyctrl-b x
to close a panelctrl-b ,
to rename a tabctrl-b C
to clear the screenctrl-k/j/k/l
to navigate between panels (also works with neovim)ctrl-b 1/2/3...
to switch to a different tab
I use neovim built in LSP for talking to the LSP Servers.
ctrl-k/j/k/l
to navigate between panels\a
LSP Code Action\w
save\ew
open current directory viewer\es
open current directory viewer in vertical split\ev
open current directory viewer in horizontal split\;
open LanguageClient context menuK
LanguageClient Hovergd
LanguageClient Go to definition- LanguageClient formats on save
ctrl-p
to trigger fuzzy finder
Used for window management, caffeine replacement (prevents machine going to sleep), etc.
caps-lock-a
Alacrittycaps-lock-b
Firefoxcaps-lock-c
Calendarcaps-lock-d
Spotifycaps-lock-e
IntelliJ IDEAcaps-lock-g
Forkcaps-lock-m
Messagescaps-lock-m
Google Chromecaps-lock-s
Slackcaps-lock-t
DataGripcaps-lock-v
Visual Studio Codecaps-lock-h
Move window to the leftcaps-lock-j
Move window to the bottomcaps-lock-k
Move window to the topcaps-lock-l
Move window to the rightcaps-lock-f
Maximize window, repeat to cycle through sizescaps-lock-y
Move window one screen westcaps-lock-u
Move window one screen southcaps-lock-i
Move window one screen northcaps-lock-o
Move window one screen east
- Remap
caps-lock
toesc
when pressed shortly and tohyper
when long-pressed.
Troubleshooting:
When you get messages like:
[2023-08-07 22:07:41.565] [error] [console_user_server] grabber_client connect_failed: Connection refused
and you have checked that the relevant Input Monitoring options in the Settings are turned on, try:
/Applications/.Nix-Karabiner/.Karabiner-VirtualHIDDevice-Manager.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Manager deactivate
/Applications/.Nix-Karabiner/.Karabiner-VirtualHIDDevice-Manager.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Manager activate
this should re-request the approval of the virtual keyboard device.
I use Rust re-implementations of many standard utilities.
- bat like
cat
but prettier - eza replacement for
ls
- fd replacement for
find
- procs replacement for
ps
- ripgrep replacement for
ag
- sd replacement for
sed
- tokei for counting lines of code
- xsv csv manipulation similar to jq
Other interesting tools:
- navi ctrl-r triggers parametric cheat sheet search (defined in
modules/navi/cheats/common.cheat
)