feat: add ghostty
This commit is contained in:
@@ -35,3 +35,15 @@ cursor-style-blink = true
|
|||||||
# 滚动条设置:通常建议隐藏,通过 Tmux 控制滚动
|
# 滚动条设置:通常建议隐藏,通过 Tmux 控制滚动
|
||||||
mouse-scroll-multiplier = 1
|
mouse-scroll-multiplier = 1
|
||||||
scrollback-limit = 10000
|
scrollback-limit = 10000
|
||||||
|
|
||||||
|
# Ghostty 配置
|
||||||
|
desktop-notifications = true
|
||||||
|
|
||||||
|
#term = xterm-256color
|
||||||
|
|
||||||
|
scrollbar = system
|
||||||
|
mouse-shift-capture = true
|
||||||
|
|
||||||
|
shell-integration-features = ssh-env,ssh-terminfo
|
||||||
|
# 开启所有 shell 集成特性,包含 ssh-terminfo 自动注入
|
||||||
|
shell-integration = fish
|
||||||
+10
-2
@@ -7,10 +7,18 @@ YELLOW='\033[1;33m'
|
|||||||
RED='\033[0;31m'
|
RED='\033[0;31m'
|
||||||
NC='\033[0m'
|
NC='\033[0m'
|
||||||
|
|
||||||
SRC="$HOME/.dotfile/ghostty/config"
|
SRC="$HOME/.dotfile/ghostty/config.ghostty"
|
||||||
DEST="$HOME/.config/ghostty/config"
|
|
||||||
|
# 根据平台确定目标路径
|
||||||
|
if [[ "$(uname)" == "Darwin" ]]; then
|
||||||
|
DEST="$HOME/Library/Application Support/com.mitchellh.ghostty/config.ghostty"
|
||||||
|
else
|
||||||
|
CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||||
|
DEST="$CONFIG_HOME/ghostty/config.ghostty"
|
||||||
|
fi
|
||||||
|
|
||||||
echo -e "${YELLOW}初始化 Ghostty 配置...${NC}"
|
echo -e "${YELLOW}初始化 Ghostty 配置...${NC}"
|
||||||
|
echo -e "${YELLOW}目标路径:$DEST${NC}"
|
||||||
|
|
||||||
# 目标目录不存在则创建
|
# 目标目录不存在则创建
|
||||||
mkdir -p "$(dirname "$DEST")"
|
mkdir -p "$(dirname "$DEST")"
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ bind | splitw -h -c '#{pane_current_path}'
|
|||||||
set -g default-terminal "screen-256color"
|
set -g default-terminal "screen-256color"
|
||||||
set -ga terminal-overrides ",*256col*:Tc"
|
set -ga terminal-overrides ",*256col*:Tc"
|
||||||
|
|
||||||
|
set-option -a terminal-features 'xterm-ghostty:RGB'
|
||||||
|
|
||||||
# 开启鼠标模式
|
# 开启鼠标模式
|
||||||
set -g mouse on
|
set -g mouse on
|
||||||
|
|
||||||
@@ -58,6 +60,16 @@ set -g set-titles-string "#{session_name}"
|
|||||||
set -s set-clipboard on
|
set -s set-clipboard on
|
||||||
set -g allow-passthrough on
|
set -g allow-passthrough on
|
||||||
|
|
||||||
|
# 1. 显式告诉 tmux 你的外壳终端支持 osc9 属性
|
||||||
|
set -as terminal-features ",*:osc9"
|
||||||
|
|
||||||
|
# 2. 强行把底层的 OSC 9 映射为直接穿透的转义包装
|
||||||
|
# \E]9;%p1%s\007 会被 tmux 自动包装成 \033Ptmux;\033]9;...\007\033\\ 发送出去
|
||||||
|
set -as terminal-overrides ",*:OSC 9=..."
|
||||||
|
#set -as terminal-overrides ",screen-256color:XT:OSC 9=\\E]9;%p1%s\\007"
|
||||||
|
set -as terminal-overrides ",screen*:OSC 9=..."
|
||||||
|
set -as terminal-overrides ",xterm*:OSC 9=..."
|
||||||
|
|
||||||
# List of plugins
|
# List of plugins
|
||||||
set -g @plugin 'tmux-plugins/tpm'
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||||
|
|||||||
Reference in New Issue
Block a user