diff --git a/CLAUDE.md b/CLAUDE.md index 8cec87d..a523a16 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -14,8 +14,10 @@ This repo strives for the **best possible macOS setup** with seamless UX: - **Batteries included** — tools, shell plugins, keybindings, and integrations should work out of the box. No manual post-install steps. - **Rice it** — the setup should look and feel polished. Consistent theming, clean status bars, good typography. - **Research before implementing** — when adding or changing something, check the internet for the best current practices, latest options, and what power users recommend. Don't guess. -- **Test it works** — after making changes, run `darwin-rebuild switch` and verify the setting actually took effect (e.g. `defaults read` for macOS prefs). The UX should be seamless. +- **Test it works** — after making changes, run `darwin-rebuild switch` and verify the setting actually took effect (e.g. `defaults read` for macOS prefs, `which ` for packages, checking service status for daemons). Never assume a fix works — always confirm. +- **Teach debugging** — always explain *how* you verified something works and *how* the user can check it themselves. Show the proof: the command to run, what the output should look like, and what it means. The user should learn to debug and verify on their own, not just trust the output. - **Stay current** — nix-darwin, home-manager, and macOS evolve. When touching a module, check if there are newer/better options available. +- **Nix-only** — never use `brew install`, `nix-env -i`, or any imperative package management. Everything goes through the flake: system packages in `darwin/configuration.nix`, user packages in `home-manager/modules/`. If it's not declared in Nix, it doesn't exist. ## Build Commands diff --git a/darwin/configuration.nix b/darwin/configuration.nix index 048dc24..7c0471c 100644 --- a/darwin/configuration.nix +++ b/darwin/configuration.nix @@ -50,6 +50,7 @@ users.users.df = { name = "df"; home = "/Users/df"; + shell = pkgs.fish; }; # Set primary user for system defaults diff --git a/home-manager/modules/tmux.nix b/home-manager/modules/tmux.nix index 46265b0..d444d2f 100644 --- a/home-manager/modules/tmux.nix +++ b/home-manager/modules/tmux.nix @@ -23,14 +23,23 @@ mouse = true; prefix = "C-a"; # More ergonomic than C-b escapeTime = 0; # No delay for escape (important for vim) - sensibleOnTop = true; + sensibleOnTop = false; # sensible's reattach-to-user-namespace overrides default-shell on macOS + shell = "${pkgs.fish}/bin/fish"; plugins = with pkgs.tmuxPlugins; [ # Core essentials sensible yank # System clipboard integration vim-tmux-navigator # Seamless vim/tmux pane navigation - better-mouse-mode # Enhanced mouse support + { + plugin = better-mouse-mode; + extraConfig = '' + set -g @scroll-without-changing-pane 'on' + set -g @scroll-in-moused-over-pane 'on' + set -g @emulate-scroll-for-no-mouse-alternate-buffer 'on' + set -g @scroll-speed-num-lines-per-scroll '3' + ''; + } # Session persistence - survive reboots { @@ -82,7 +91,7 @@ # Status bar modules set -g @catppuccin_status_modules_right 'session date_time' - set -g @catppuccin_status_modules_left '''' + set -g @catppuccin_status_modules_left "" set -g @catppuccin_date_time_text '%H:%M' ''; } @@ -93,9 +102,16 @@ # GENERAL SETTINGS # ============================================ + # Force fish as the shell — override sensible plugin's reattach-to-user-namespace + set -g default-command "${pkgs.fish}/bin/fish" + # True color support set -ag terminal-overrides ",xterm-256color:RGB" set -ag terminal-overrides ",*256col*:Tc" + + # Extended keys — lets tmux forward Shift+Enter, Ctrl+Enter, etc. + set -s extended-keys on + set -as terminal-features 'xterm*:extkeys' # Undercurl support (for spell checking in nvim) set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'