Update all configs: migrate nvim to LazyVim, refresh fish/kitty/tmux

- nvim: AstroNvim → LazyVim with Dracula theme, add python/yaml/docker/json/markdown extras
- kitty: restructure to .config/kitty/, add catppuccin-mocha theme
- fish: add lazy-loading for credentials, gitea config, chrome-debug function
- tmux: update config
- Move dotfiles repo from ~/Projects/config/dotfiles to ~/dotfiles

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
kappa
2026-02-09 09:34:08 +09:00
parent 386bae48d9
commit 99ad121620
37 changed files with 891 additions and 893 deletions

View File

@@ -0,0 +1,150 @@
# fish completion for wrangler -*- shell-script -*-
# Define shell completion directives
set -l ShellCompDirectiveError 1
set -l ShellCompDirectiveNoSpace 2
set -l ShellCompDirectiveNoFileComp 4
set -l ShellCompDirectiveFilterFileExt 8
set -l ShellCompDirectiveFilterDirs 16
set -l ShellCompDirectiveKeepOrder 32
function __wrangler_debug
set -l file "$BASH_COMP_DEBUG_FILE"
if test -n "$file"
echo "$argv" >> $file
end
end
function __wrangler_perform_completion
__wrangler_debug "Starting __wrangler_perform_completion"
# Extract all args except the completion flag
set -l args (string match -v -- "--completion=" (commandline -opc))
# Extract the current token being completed
set -l current_token (commandline -ct)
# Check if current token starts with a dash
set -l flag_prefix ""
if string match -q -- "-*" $current_token
set flag_prefix "--flag="
end
__wrangler_debug "Current token: $current_token"
__wrangler_debug "All args: $args"
# Call the completion program and get the results
set -l requestComp "wrangler complete -- $args"
__wrangler_debug "Calling $requestComp"
set -l results (eval $requestComp 2> /dev/null)
# Some programs may output extra empty lines after the directive.
# Let's ignore them or else it will break completion.
# Ref: https://github.com/spf13/cobra/issues/1279
for line in $results[-1..1]
if test (string sub -s 1 -l 1 -- $line) = ":"
# The directive
set -l directive (string sub -s 2 -- $line)
set -l directive_num (math $directive)
break
end
end
# No directive specified, use default
if not set -q directive_num
set directive_num 0
end
__wrangler_debug "Directive: $directive_num"
# Process completions based on directive
if test $directive_num -eq $ShellCompDirectiveError
# Error code. No completion.
__wrangler_debug "Received error directive: aborting."
return 1
end
# Filter out the directive (last line)
if test (count $results) -gt 0 -a (string sub -s 1 -l 1 -- $results[-1]) = ":"
set results $results[1..-2]
end
# No completions, let fish handle file completions unless forbidden
if test (count $results) -eq 0
if test $directive_num -ne $ShellCompDirectiveNoFileComp
__wrangler_debug "No completions, performing file completion"
return 1
end
__wrangler_debug "No completions, but file completion forbidden"
return 0
end
# Filter file extensions
if test $directive_num -eq $ShellCompDirectiveFilterFileExt
__wrangler_debug "File extension filtering"
set -l file_extensions
for item in $results
if test -n "$item" -a (string sub -s 1 -l 1 -- $item) != "-"
set -a file_extensions "*$item"
end
end
__wrangler_debug "File extensions: $file_extensions"
# Use the file extensions as completions
set -l completions
for ext in $file_extensions
# Get all files matching the extension
set -a completions (string replace -r '^.*/' '' -- $ext)
end
for item in $completions
echo -e "$item "
end
return 0
end
# Filter directories
if test $directive_num -eq $ShellCompDirectiveFilterDirs
__wrangler_debug "Directory filtering"
set -l dirs
for item in $results
if test -d "$item"
set -a dirs "$item/"
end
end
for item in $dirs
echo -e "$item "
end
return 0
end
# Process remaining completions
for item in $results
if test -n "$item"
# Check if the item has a description
if string match -q "* *" -- "$item"
set -l completion_parts (string split -- "$item")
set -l comp $completion_parts[1]
set -l desc $completion_parts[2]
# Add the completion and description
echo -e "$comp $desc"
else
# Add just the completion
echo -e "$item "
end
end
end
# If directive contains NoSpace, tell fish not to add a space after completion
if test (math "$directive_num & $ShellCompDirectiveNoSpace") -ne 0
return 2
end
return 0
end
# Set up the completion for the wrangler command
complete -c wrangler -f -a "(eval __wrangler_perform_completion)"

View File

@@ -0,0 +1,14 @@
# This file was created by fish when upgrading to version 4.3, to migrate
# the 'fish_key_bindings' variable from its old default scope (universal)
# to its new default scope (global). We recommend you delete this file
# and configure key bindings in ~/.config/fish/config.fish if needed.
# set --global fish_key_bindings fish_default_key_bindings
# Prior to version 4.3, fish shipped an event handler that runs
# `set --universal fish_key_bindings fish_default_key_bindings`
# whenever the fish_key_bindings variable is erased.
# This means that as long as any fish < 4.3 is still running on this system,
# we cannot complete the migration.
# As a workaround, erase the universal variable at every shell startup.
set --erase --universal fish_key_bindings

View File

@@ -0,0 +1,37 @@
# This file was created by fish when upgrading to version 4.3, to migrate
# theme variables from universal to global scope.
# Don't edit this file, as it will be written by the web-config tool (`fish_config`).
# To customize your theme, delete this file and see
# help interactive#syntax-highlighting
# or
# man fish-interactive | less +/^SYNTAX.HIGHLIGHTING
# for appropriate commands to add to ~/.config/fish/config.fish instead.
# See also the release notes for fish 4.3.0 (run `help relnotes`).
set --global fish_color_autosuggestion brblack
set --global fish_color_cancel -r
set --global fish_color_command normal
set --global fish_color_comment red
set --global fish_color_cwd green
set --global fish_color_cwd_root red
set --global fish_color_end green
set --global fish_color_error brred
set --global fish_color_escape brcyan
set --global fish_color_history_current --bold
set --global fish_color_host normal
set --global fish_color_host_remote yellow
set --global fish_color_normal normal
set --global fish_color_operator brcyan
set --global fish_color_param cyan
set --global fish_color_quote yellow
set --global fish_color_redirection cyan --bold
set --global fish_color_search_match white --background=brblack
set --global fish_color_selection white --bold --background=brblack
set --global fish_color_status red
set --global fish_color_user brgreen
set --global fish_color_valid_path --underline
set --global fish_pager_color_completion normal
set --global fish_pager_color_description yellow -i
set --global fish_pager_color_prefix normal --bold --underline
set --global fish_pager_color_progress brwhite --background=cyan
set --global fish_pager_color_selected_background -r

View File

@@ -1,13 +1,18 @@
# Fix fish_complete_path (중복 방지)
if not contains ~/.config/fish/completions $fish_complete_path
set -g fish_complete_path ~/.config/fish/completions $fish_complete_path
end
if status is-interactive
# Commands to run in interactive sessions can go here
# Set default Node.js version
nvm use lts --silent
nvm use 20 --silent
# Add uv to PATH
fish_add_path $HOME/.local/bin
# kitty integration 최적화
if test "$TERM" = xterm-kitty
# kitty shell integration 설정 (kssh 제외)
# kitty shell integration 설정
alias icat="kitty +kitten icat"
alias kdiff="kitty +kitten diff"
@@ -24,7 +29,7 @@ if status is-interactive
alias tml="tmux list-sessions"
alias tmk="tmux kill-session -t"
# kitten 유틸리티 alias들 (kssh 제외)
# kitten 유틸리티 alias들
alias clipboard="kitty +kitten clipboard"
alias img="kitty +kitten icat"
alias unicode="kitty +kitten unicode_input"
@@ -39,11 +44,26 @@ end
set -x VAULT_ADDR "https://vault.anvil.it.com"
set -x VAULT_TOKEN "hvs.o7JrzES15uuXRmvlKAJKEaTv"
# Cloudflare Configuration
set -x CF_API_KEY (vault kv get -field=api_key secret/cloudflare 2>/dev/null || echo "")
set -x CF_EMAIL (vault kv get -field=email secret/cloudflare 2>/dev/null || echo "")
# Gitea Configuration
set -gx GITEA_URL "https://gitea.anvil.it.com"
set -gx GITEA_TOKEN (security find-internet-password -s gitea.anvil.it.com -a kaffa -w 2>/dev/null)
# Cloudflare Configuration - Lazy Loading
function load_cloudflare_credentials
if not set -q CF_API_KEY
set -gx CF_API_KEY (vault kv get -field=api_key secret/cloudflare 2>/dev/null || echo "")
set -gx CF_EMAIL (vault kv get -field=email secret/cloudflare 2>/dev/null || echo "")
echo "✓ Cloudflare credentials loaded"
end
end
# Auto-load when using cf command
if command -v cf >/dev/null
alias cf='load_cloudflare_credentials && command cf'
end
alias vi=nvim
alias ssh=tssh
alias docker "limactl shell docker -- docker"
alias podman "limactl shell podman -- podman"
alias ss='netstat -an'
@@ -51,3 +71,28 @@ alias ss='netstat -an'
# Set default editor for Claude Code /memory command
set -Ux VISUAL nvim
set -Ux EDITOR nvim
# Added by Antigravity
fish_add_path /Users/kaffa/.antigravity/antigravity/bin
# ══════════════════════════════════════════════════════════════════
# Claude Code tmux 단축키
# ══════════════════════════════════════════════════════════════════
# Claude 세션 빠른 시작
alias tc='tmux-claude'
# 현재 디렉토리에서 Claude 세션
alias tcc='tmux-claude (pwd)'
# tmux 패널 내용 복사 (최근 1000줄)
function tcopy
tmux capture-pane -pS -1000 | pbcopy
echo "패널 내용 복사됨 (최근 1000줄)"
end
# Claude 응답 검색 (tmux 히스토리에서)
function csearch
tmux copy-mode
tmux send-keys "?" "$argv" Enter
end

View File

@@ -0,0 +1,53 @@
if status is-interactive
# Commands to run in interactive sessions can go here
# Set default Node.js version
nvm use lts --silent
# Add uv to PATH
fish_add_path $HOME/.local/bin
# kitty integration 최적화
if test "$TERM" = xterm-kitty
# kitty shell integration 설정 (kssh 제외)
alias icat="kitty +kitten icat"
alias kdiff="kitty +kitten diff"
# 빠른 디렉토리 이동 (kitty의 프롬프트 마킹 활용)
bind \cg 'history | fzf | read -l result; and commandline $result'
# 파일 미리보기
alias preview="fzf --preview 'if test -d {}; eza -la {}; else; bat --color=always {}; end'"
# tmux 유틸리티 함수들
alias tm="tmux"
alias tma="tmux attach-session -t"
alias tmn="tmux new-session -s"
alias tml="tmux list-sessions"
alias tmk="tmux kill-session -t"
# kitten 유틸리티 alias들 (kssh 제외)
alias clipboard="kitty +kitten clipboard"
alias img="kitty +kitten icat"
alias unicode="kitty +kitten unicode_input"
alias hgrep="kitty +kitten hyperlinked_grep"
# 이미지 갤러리 함수 (간단한 alias로 변경)
alias imgls="find . -maxdepth 1 -type f \( -name '*.png' -o -name '*.jpg' -o -name '*.jpeg' -o -name '*.gif' -o -name '*.webp' \) | head -5 | xargs -I {} kitty +kitten icat --align center {}"
end
end
# Vault Configuration
set -x VAULT_ADDR "https://vault.anvil.it.com"
set -x VAULT_TOKEN "hvs.o7JrzES15uuXRmvlKAJKEaTv"
# Cloudflare Configuration
set -x CF_API_KEY (vault kv get -field=api_key secret/cloudflare 2>/dev/null || echo "")
set -x CF_EMAIL (vault kv get -field=email secret/cloudflare 2>/dev/null || echo "")
alias vi=nvim
alias docker "limactl shell docker -- docker"
alias podman "limactl shell podman -- podman"
alias ss='netstat -an'
# Set default editor for Claude Code /memory command
set -Ux VISUAL nvim
set -Ux EDITOR nvim

View File

@@ -0,0 +1,30 @@
function chrome-debug --description "Launch Chrome with remote debugging port"
set -l port 9222
set -l profile_dir "$HOME/.chrome-debug-profile"
# Parse port argument
for arg in $argv
if string match -qr '^\d+$' $arg
set port $arg
end
end
# Create persistent debug profile directory
mkdir -p $profile_dir
# Kill existing Chrome
pkill -f "Google Chrome" 2>/dev/null
sleep 2
# Launch Chrome with persistent debug profile
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
--remote-debugging-port=$port \
--user-data-dir=$profile_dir &
disown 2>/dev/null
sleep 3
echo "✓ Chrome (디버그 프로필) - port $port"
echo " 프로필: $profile_dir"
echo "→ agent-browser connect $port"
end