diff --git a/Brewfile b/Brewfile index 8e83f3a..3f90ad7 100644 --- a/Brewfile +++ b/Brewfile @@ -17,7 +17,7 @@ brew 'wget' brew 'certbot' brew 'the_silver_searcher' brew 'ripgrep' -brew 'asdf' +brew 'mise' brew 'gpg2' brew 'skopeo' brew 'stow' diff --git a/config/tmux/.tmux.conf.local b/config/tmux/.tmux.conf.local index 076a5c3..48f619d 100644 --- a/config/tmux/.tmux.conf.local +++ b/config/tmux/.tmux.conf.local @@ -30,3 +30,7 @@ tmux_conf_theme_colour_14="#232136" # base — right seg fg (on light) tmux_conf_theme_colour_15="#2a273f" # surface — right seg bg tmux_conf_theme_colour_16="#eb6f92" # love — right seg bg tmux_conf_theme_colour_17="#e0def4" # text — right seg bg (host, light) + +# status line content +tmux_conf_theme_status_left=" ❐ #S | #{pretty_pane_current_path} " # session name + active pane cwd (home-shortened) +tmux_conf_theme_status_right=" #{prefix}#{mouse}#{pairing}#{synchronized} , %R , %d %b | #{hostname} " # state flags | time | date | host diff --git a/config/wezterm/wezterm.lua b/config/wezterm/wezterm.lua index 1b0fea9..fec8e1e 100644 --- a/config/wezterm/wezterm.lua +++ b/config/wezterm/wezterm.lua @@ -2,8 +2,8 @@ local wezterm = require 'wezterm' local config = wezterm.config_builder() -config.initial_cols = 140 -config.initial_rows = 40 +config.initial_cols = 120 +config.initial_rows = 60 config.color_scheme = 'rose-pine-moon' config.max_fps = 120 @@ -28,6 +28,7 @@ config.window_background_opacity = 0.8 config.macos_window_background_blur = 50 config.font_size = 15.0 config.window_frame.font_size = 13.0 +config.native_macos_fullscreen_mode = true config.keys = { { @@ -45,6 +46,68 @@ config.keys = { mods = 'CMD', action = wezterm.action.ToggleFullScreen, }, + { + key = 'f', + mods = 'CMD|CTRL', + action = wezterm.action.ToggleFullScreen, + }, + -- zsh's emacs keymap moves by word on ESC-b/ESC-f, not OPT+Arrow + { + key = 'LeftArrow', + mods = 'OPT', + action = wezterm.action.SendKey { key = 'b', mods = 'ALT' }, + }, + { + key = 'RightArrow', + mods = 'OPT', + action = wezterm.action.SendKey { key = 'f', mods = 'ALT' }, + }, + -- zsh binds backward-kill-word to Ctrl-W + { + key = 'Backspace', + mods = 'OPT', + action = wezterm.action.SendString '\x17', + }, + -- zsh binds beginning/end-of-line to Ctrl-A/Ctrl-E + { + key = 'LeftArrow', + mods = 'CMD', + action = wezterm.action.SendString '\x01', + }, + { + key = 'RightArrow', + mods = 'CMD', + action = wezterm.action.SendString '\x05', + }, + -- zsh binds kill-whole-line to Ctrl-U + { + key = 'Backspace', + mods = 'CMD', + action = wezterm.action.SendString '\x15', + }, + { + key = 'k', + mods = 'CMD', + action = wezterm.action.ClearScrollback 'ScrollbackAndViewport', + }, +} + +-- tmux's `mouse on` captures clicks before wezterm's link handling sees them; +-- holding CMD bypasses that (wezterm's default bypass modifier is SHIFT) +config.bypass_mouse_reporting_modifiers = 'SUPER' + +config.mouse_bindings = { + { + event = { Up = { streak = 1, button = 'Left' } }, + mods = 'SUPER', + action = wezterm.action.OpenLinkAtMouseCursor, + }, + -- swallow the paired Down event so the click isn't also sent to the pane + { + event = { Down = { streak = 1, button = 'Left' } }, + mods = 'SUPER', + action = wezterm.action.Nop, + }, } return config diff --git a/config/zsh/.zshrc b/config/zsh/.zshrc index 68630bc..56f6323 100644 --- a/config/zsh/.zshrc +++ b/config/zsh/.zshrc @@ -122,7 +122,6 @@ ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=4' export NVM_DIR="$HOME/.nvm" export GOPATH=$HOME/go -export GOROOT="$(brew --prefix golang)/libexec" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion @@ -143,8 +142,7 @@ export PYENV_ROOT="$HOME/.pyenv" # bun export BUN_INSTALL="$HOME/.bun" -export PATH="$PATH:/opt/homebrew/bin" -export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin" +eval "$(/opt/homebrew/bin/brew shellenv)" export PATH="$PATH:$HOME/.rvm/bin" export PATH="$PYENV_ROOT/bin:$PATH" export PATH="$BUN_INSTALL/bin:$PATH" @@ -158,3 +156,10 @@ if [ -f '/Users/sankalp/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/s # mise version manager eval "$(mise activate zsh)" +eval "$(direnv hook zsh)" + +# >>> grok installer >>> +export PATH="$HOME/.grok/bin:$PATH" +fpath=(~/.grok/completions/zsh $fpath) +autoload -Uz compinit && compinit -C +# <<< grok installer <<< diff --git a/config/zsh/aliases.zsh b/config/zsh/aliases.zsh index 490d295..366d710 100644 --- a/config/zsh/aliases.zsh +++ b/config/zsh/aliases.zsh @@ -21,6 +21,8 @@ kexec(){ # kexec [-c ] [cmd...] local pod pod=$(kpod "$1") + # multiple replicas can match; let fzf pick one + [[ $(echo "$pod" | wc -l) -gt 1 ]] && pod=$(echo "$pod" | fzf --layout=reverse) if [[ "$2" == "-c" ]]; then local container="$3" if [[ -z "$4" ]]; then @@ -155,3 +157,5 @@ prompts() { ls "$prompt_dir" fi } + +alias c="claude --dangerously-skip-permissions"