update CLAUDE.md philosophy, set fish as default shell, improve tmux config
CLAUDE.md: add nix-only rule, verify-after-change rule, teach-debugging rule. darwin: set fish as default user shell. tmux: configure better-mouse-mode, fix catppuccin status, add extended keys. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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.
|
- **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.
|
- **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.
|
- **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 <pkg>` 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.
|
- **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
|
## Build Commands
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,7 @@
|
|||||||
users.users.df = {
|
users.users.df = {
|
||||||
name = "df";
|
name = "df";
|
||||||
home = "/Users/df";
|
home = "/Users/df";
|
||||||
|
shell = pkgs.fish;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set primary user for system defaults
|
# Set primary user for system defaults
|
||||||
|
|||||||
@@ -23,14 +23,23 @@
|
|||||||
mouse = true;
|
mouse = true;
|
||||||
prefix = "C-a"; # More ergonomic than C-b
|
prefix = "C-a"; # More ergonomic than C-b
|
||||||
escapeTime = 0; # No delay for escape (important for vim)
|
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; [
|
plugins = with pkgs.tmuxPlugins; [
|
||||||
# Core essentials
|
# Core essentials
|
||||||
sensible
|
sensible
|
||||||
yank # System clipboard integration
|
yank # System clipboard integration
|
||||||
vim-tmux-navigator # Seamless vim/tmux pane navigation
|
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
|
# Session persistence - survive reboots
|
||||||
{
|
{
|
||||||
@@ -82,7 +91,7 @@
|
|||||||
|
|
||||||
# Status bar modules
|
# Status bar modules
|
||||||
set -g @catppuccin_status_modules_right 'session date_time'
|
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'
|
set -g @catppuccin_date_time_text '%H:%M'
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
@@ -93,9 +102,16 @@
|
|||||||
# GENERAL SETTINGS
|
# 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
|
# True color support
|
||||||
set -ag terminal-overrides ",xterm-256color:RGB"
|
set -ag terminal-overrides ",xterm-256color:RGB"
|
||||||
set -ag terminal-overrides ",*256col*:Tc"
|
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)
|
# Undercurl support (for spell checking in nvim)
|
||||||
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
|
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
|
||||||
|
|||||||
Reference in New Issue
Block a user