- 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>
179 lines
5.9 KiB
Bash
179 lines
5.9 KiB
Bash
# 기본 설정 - kitty 최적화
|
|
set -g default-terminal "xterm-kitty"
|
|
set -g terminal-overrides "xterm-kitty:Tc"
|
|
set -g history-limit 10000
|
|
|
|
# kitty 키보드 프로토콜 지원
|
|
set -s extended-keys on
|
|
set -as terminal-features 'xterm-kitty:extkeys'
|
|
|
|
# 마우스 지원 활성화
|
|
set -g mouse on
|
|
|
|
# Prefix 키를 Ctrl+a로 변경 (더 편한 위치)
|
|
unbind C-b
|
|
set -g prefix C-a
|
|
bind C-a send-prefix
|
|
|
|
# 설정 파일 다시 로드
|
|
bind r source-file ~/.tmux.conf \; display-message "설정을 다시 로드했습니다!"
|
|
|
|
# 창 분할을 더 직관적으로
|
|
bind | split-window -h -c "#{pane_current_path}"
|
|
bind - split-window -v -c "#{pane_current_path}"
|
|
unbind '"'
|
|
unbind %
|
|
|
|
# 패널 이동을 Vim 스타일로
|
|
bind h select-pane -L
|
|
bind j select-pane -D
|
|
bind k select-pane -U
|
|
bind l select-pane -R
|
|
|
|
# Alt + 화살표로 패널 이동
|
|
bind -n M-Left select-pane -L
|
|
bind -n M-Right select-pane -R
|
|
bind -n M-Up select-pane -U
|
|
bind -n M-Down select-pane -D
|
|
|
|
# 패널 크기 조절
|
|
bind -r H resize-pane -L 5
|
|
bind -r J resize-pane -D 5
|
|
bind -r K resize-pane -U 5
|
|
bind -r L resize-pane -R 5
|
|
|
|
# 창 이동
|
|
bind -n S-Left previous-window
|
|
bind -n S-Right next-window
|
|
|
|
# 창 번호 1번부터 시작
|
|
set -g base-index 1
|
|
setw -g pane-base-index 1
|
|
|
|
# 창 이름 자동 변경 비활성화
|
|
set-option -g allow-rename off
|
|
|
|
# Dracula 테마 상태바 설정
|
|
set -g status-position bottom
|
|
set -g status-style 'bg=#282a36 fg=#f8f8f2'
|
|
set -g status-left '#[fg=#282a36,bg=#bd93f9,bold] #S #[fg=#bd93f9,bg=#282a36] '
|
|
set -g status-right '#[fg=#50fa7b,bg=#282a36] %Y-%m-%d #[fg=#8be9fd,bg=#282a36] %H:%M #[fg=#282a36,bg=#ff79c6,bold] #h '
|
|
set -g status-right-length 50
|
|
set -g status-left-length 20
|
|
|
|
# 현재 창 스타일 (Dracula)
|
|
setw -g window-status-current-style 'fg=#282a36 bg=#f8f8f2 bold'
|
|
setw -g window-status-current-format ' #I:#W#F '
|
|
|
|
# 일반 창 스타일 (Dracula)
|
|
setw -g window-status-style 'fg=#6272a4 bg=#282a36'
|
|
setw -g window-status-format ' #I:#W#F '
|
|
|
|
# 메시지 스타일 (Dracula)
|
|
set -g message-style 'fg=#282a36 bg=#ffb86c bold'
|
|
|
|
# 복사 모드를 vi 스타일로
|
|
setw -g mode-keys vi
|
|
bind -T copy-mode-vi v send-keys -X begin-selection
|
|
bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel
|
|
|
|
# 패널 경계선 (Dracula, bg=default로 kitty 투명도 유지)
|
|
set -g pane-border-style 'fg=#6272a4 bg=default'
|
|
set -g pane-active-border-style 'fg=#bd93f9 bg=default'
|
|
|
|
# Neovim 통합 설정
|
|
# Smart pane switching with awareness of Vim splits
|
|
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
|
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'"
|
|
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
|
|
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
|
|
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
|
|
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
|
|
|
|
# tmux-navigator 호환성
|
|
bind-key -T copy-mode-vi 'C-h' select-pane -L
|
|
bind-key -T copy-mode-vi 'C-j' select-pane -D
|
|
bind-key -T copy-mode-vi 'C-k' select-pane -U
|
|
bind-key -T copy-mode-vi 'C-l' select-pane -R
|
|
bind-key -T copy-mode-vi 'C-\' select-pane -l
|
|
|
|
# Neovim 서버와 클립보드 동기화
|
|
if-shell 'command -v pbcopy' {
|
|
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'pbcopy'
|
|
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'pbcopy'
|
|
}
|
|
|
|
# Fish shell이 기본 셸인 경우
|
|
set -g default-shell /opt/homebrew/bin/fish
|
|
# ══════════════════════════════════════════════════════════════════
|
|
# Claude Code 최적화 설정
|
|
# ══════════════════════════════════════════════════════════════════
|
|
|
|
# 히스토리 대폭 증가 (Claude 출력량 많음)
|
|
set -g history-limit 50000
|
|
|
|
# 빠른 ESC 응답 (Claude Code 입력 반응성)
|
|
set -sg escape-time 10
|
|
|
|
# 포커스 이벤트 전달 (에디터 통합)
|
|
set -g focus-events on
|
|
|
|
# 256색 + True Color 강제
|
|
set -sa terminal-overrides ",*:Tc"
|
|
|
|
# 스크롤 속도 개선 (Claude 긴 응답 탐색)
|
|
bind -T copy-mode-vi WheelUpPane select-pane \; send-keys -X -N 3 scroll-up
|
|
bind -T copy-mode-vi WheelDownPane select-pane \; send-keys -X -N 3 scroll-down
|
|
|
|
# 빠른 복사 모드 진입 (Prefix + v)
|
|
bind v copy-mode
|
|
|
|
# 클립보드 자동 동기화 (macOS)
|
|
set -g set-clipboard on
|
|
|
|
# 패널 동기화 토글 (여러 서버 동시 작업)
|
|
bind S setw synchronize-panes \; display-message "Pane sync: #{?pane_synchronized,ON,OFF}"
|
|
|
|
# Claude Code 전용 레이아웃
|
|
# Prefix + C: Claude 작업 레이아웃 (메인 70% + 사이드 30%)
|
|
bind C split-window -h -p 30 -c "#{pane_current_path}" \; select-pane -L
|
|
|
|
# Prefix + M: 모니터링 레이아웃 (상단 80% Claude + 하단 20% 로그)
|
|
bind M split-window -v -p 20 -c "#{pane_current_path}" \; select-pane -U
|
|
|
|
# 빠른 패널 최대화 토글 (Prefix + z 기본 + Prefix + f 추가)
|
|
bind f resize-pane -Z
|
|
|
|
# 현재 패널을 새 창으로 분리
|
|
bind b break-pane -d
|
|
|
|
# 패널 회전 (작업 공간 빠른 전환)
|
|
bind -r o rotate-window
|
|
|
|
# 마지막 창으로 빠른 이동 (Prefix + Tab)
|
|
bind Tab last-window
|
|
|
|
# 마지막 패널로 빠른 이동 (Prefix + `)
|
|
bind ` last-pane
|
|
|
|
# 빠른 세션 전환
|
|
bind ( switch-client -p
|
|
bind ) switch-client -n
|
|
|
|
# 세션 저장/복원 (tmux-resurrect 플러그인 없이)
|
|
# 현재 레이아웃 저장
|
|
bind W command-prompt -p "Save layout as:" "run-shell 'tmux list-windows -F \"##{window_layout}\" > ~/.tmux-layout-%%'"
|
|
|
|
# Claude 출력 빠른 검색 (Prefix + /)
|
|
bind / copy-mode \; send-keys ?
|
|
|
|
# 현재 패널 내용을 파일로 저장
|
|
bind P command-prompt -p "Save pane to:" "capture-pane -S -50000 ; save-buffer '%%'"
|
|
|
|
# 활성 패널 강조 (default로 설정해야 kitty 투명도 유지)
|
|
set -g window-style 'bg=default'
|
|
set -g window-active-style 'bg=default'
|
|
|
|
# 클립보드 히스토리 증가
|
|
set -g buffer-limit 20
|