终端工具配置

张开发
2026/5/16 20:25:33 15 分钟阅读
终端工具配置
文章目录Ghoustty安装配置文件修复远程服务器bugstarship安装~/.config/starship.toml配置~/.zshrc 或者 ~/.bashrcTMUX~/.tmux.conf配置加载配置文件Ghoustty安装brewinstall--caskghostty配置文件# # Ghostty Terminal - Complete Configuration# # --- Typography ---font-familyMaple Mono NF CNfont-size15font-thickentrueadjust-cell-height6# --- Theme and Colors ---themeKanagawa Wave# --- Window and Appearance ---background-opacity0.8macos-titlebar-styletransparent window-padding-x16window-padding-y4window-save-statenever window-width125window-height31window-themeauto# --- Cursor ---cursor-stylebar cursor-style-blinktrue# --- Mouse ---mouse-hide-while-typingtruecopy-on-selectclipboard# --- Quick Terminal (Quake-style dropdown) ---quick-terminal-positiontopquick-terminal-screenmouse quick-terminal-autohidetruequick-terminal-animation-duration0.15# --- Close behavior ---confirm-close-surfacefalse# --- Security ---clipboard-paste-protectiontrueclipboard-paste-bracketed-safetrue# --- Shell Integration ---shell-integrationdetect shell-integration-featurescursor,sudo,no-title,ssh-env,ssh-terminfo,path# --- Keybindings ---# Tabskeybindcmdtnew_tab keybindcmdshiftleftprevious_tab keybindcmdshiftrightnext_tab keybindcmdwclose_surface# Splitskeybindcmddnew_split:right keybindcmdshiftdnew_split:down keybindcmdaltleftgoto_split:left keybindcmdaltrightgoto_split:right keybindcmdaltupgoto_split:top keybindcmdaltdowngoto_split:bottom# Font sizekeybindcmdplusincrease_font_size:1 keybindcmdminusdecrease_font_size:1 keybindcmdzeroreset_font_size# Quick terminal global hotkeykeybindglobal:ctrlgrave_accenttoggle_quick_terminal# Splits managementkeybindcmdshifteequalize_splits keybindcmdshiftftoggle_split_zoom# Reload configkeybindcmdshiftcommareload_config# --- Performance ---scrollback-limit25000000修复远程服务器bug需要在~/.ssh/config中设置好远程服务器样式starship安装brew instapp starship或者curl-sShttps://starship.rs/install.sh|sh~/.config/starship.toml配置https://raw.githubusercontent.com/cradiator/dotfiles/refs/heads/main/.config/starship.toml~/.zshrc 或者 ~/.bashrceval$(starship initzsh)eval$(starship initbash)source加载配置文件TMUX~/.tmux.conf配置vim~/.tmux.conf粘贴# # 基础设置# # 修改前缀键 (默认是 Ctrlb)set-gprefix C-a unbind C-bbindC-a send-prefix# 启用鼠标支持set-gmouse on# 更快的响应set-sgescape-time0# 终端颜色set-gdefault-terminalxterm-256color# # 窗口和面板# # 使用 | 和 - 分割窗口bind|split-window-hbind- split-window-vunbindunbind %# 使用 vim 风格移动 panebindh select-pane-Lbindj select-pane-Dbindk select-pane-Ubindl select-pane-R# 调整 pane 大小bind-rH resize-pane-L5bind-rJ resize-pane-D5bind-rK resize-pane-U5bind-rL resize-pane-R5# 重新加载配置bindr source-file ~/.tmux.conf\;displayConfig Reloaded!# # 窗口操作# # 更容易切换窗口bind-nC-Left previous-windowbind-nC-Right next-window# 快速新窗口bindc new-window-c#{pane_current_path}# 新pane继承路径bindsplit-window-v-c#{pane_current_path}bind% split-window-h-c#{pane_current_path}# # 复制模式 (更像vim)# setw-gmode-keysvi# 进入复制模式bindEnter copy-mode# 复制快捷键bind-key-Tcopy-mode-vivsend-keys-Xbegin-selection bind-key-Tcopy-mode-vi y send-keys-Xcopy-selection-and-cancel# # 状态栏# set-gstatus-bg colour235set-gstatus-fg whiteset-gstatus-left-length50set-gstatus-right-length100# 左侧set-gstatus-left#[fggreen]#S # 右侧set-gstatus-right#[fgyellow]#(whoami) #[fgcyan]%Y-%m-%d %H:%M # # 窗口样式# setw-gwindow-status-current-stylefgblack,bggreen setw-gwindow-status-stylefgwhite,bgcolour235# # 历史记录# set-ghistory-limit100000# # 快速清屏# bindC-l send-keysC-l# # 自动重命名# set-option-gallow-rename off加载配置文件tmuxsource~/.tmux.conf

更多文章