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-hjklbetween tmux/nvim panels) - Karabiner and Hammerspoon (map
caps-locktoesc, 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 cto create a new tabctrl-b -to split verticallyctrl-b |to split horizontallyctrl-b xto close a panelctrl-b ,to rename a tabctrl-b Cto clear the screenctrl-k/j/k/lto 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/lto navigate between panels\aLSP Code Action\wsave\ewopen current directory viewer\esopen current directory viewer in vertical split\evopen current directory viewer in horizontal split\;open LanguageClient context menuKLanguageClient HovergdLanguageClient Go to definition- LanguageClient formats on save
ctrl-pto trigger fuzzy finder
Used for window management, caffeine replacement (prevents machine going to sleep), etc.
caps-lock-aAlacrittycaps-lock-bFirefoxcaps-lock-cCalendarcaps-lock-dSpotifycaps-lock-eIntelliJ IDEAcaps-lock-gForkcaps-lock-mMessagescaps-lock-mGoogle Chromecaps-lock-sSlackcaps-lock-tDataGripcaps-lock-vVisual Studio Codecaps-lock-hMove window to the leftcaps-lock-jMove window to the bottomcaps-lock-kMove window to the topcaps-lock-lMove window to the rightcaps-lock-fMaximize window, repeat to cycle through sizescaps-lock-yMove window one screen westcaps-lock-uMove window one screen southcaps-lock-iMove window one screen northcaps-lock-oMove window one screen east
- Remap
caps-locktoescwhen pressed shortly and tohyperwhen 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
catbut 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)
