Fix kitty integration config

This commit is contained in:
rydesun 2022-10-24 01:06:48 +08:00
parent 589d390c04
commit c1f8cd5750
3 changed files with 14 additions and 26 deletions

View file

@ -26,9 +26,6 @@ map ctrl+g>shift+i kitten hints --type=ip --program @
map ctrl+g>ctrl+n kitten hints --type=linenum nvim +{line} {path}
map ctrl+g>ctrl+y kitten hints --type=hyperlink
# 在zsh中手动集成
shell_integration disabled
# 优先使用Nerd font会覆盖其他字体的字形
# 包含私用空间、中日韩兼容表意文字、字母表现形式、阿拉伯表现形式A
symbol_map U+E000-U+FDFF Symbols Nerd Font

View file

@ -1,3 +1,7 @@
protocol file
fragment_matches [0-9]+
action launch --type=overlay ${EDITOR} +${FRAGMENT} ${FILE_PATH}
protocol file
mime text/html
action launch firefox ${FILE_PATH}
@ -6,10 +10,6 @@ protocol file
mime text/*
action launch --type=overlay ${EDITOR} ${FILE_PATH}
protocol file
fragment_matches [0-9]+
action launch --type=overlay ${EDITOR} +${FRAGMENT} ${FILE_PATH}
protocol file
mime image/*
action launch --type=overlay kitty +kitten icat --hold ${FILE_PATH}

29
.zshrc
View file

@ -260,7 +260,7 @@ WORDCHARS='*?_-.[]~&;!#$%^(){}<>'
# sudo后面的命令可以是alias
alias sudo='sudo '
# 命令的默认行为
### 命令的默认行为
alias ls='ls --color=auto --time-style=iso --human-readable --hyperlink=auto -F'
alias grep='grep --color=auto'
alias diff='diff --color=auto'
@ -271,12 +271,19 @@ alias mitmproxy="mitmproxy --set confdir=$XDG_CONFIG_HOME/mitmproxy"
alias mitmweb="mitmweb --set confdir=$XDG_CONFIG_HOME/mitmproxy"
alias rsync="rsync -avhHP"
### 与kitty集成
if ((Z_ENV_KITTY)); then
alias ssh='kitty +kitten ssh'
alias rg='kitty +kitten hyperlinked_grep'
alias icat='kitty +kitten icat'
fi
### 命令缩写
alias sl='ls'
alias l='ls -l'
alias la='ls -A'
alias ll='ls -Al'
# 命令缩写
alias g='git'
alias x='xdg-open'
# 需要搭配我的neovim配置
@ -291,7 +298,6 @@ if (($Z_ENV_NVIM)); then
else
alias e='nvim'
fi
alias g='git'
alias cfg='GIT_DIR=$HOME/.myconf GIT_WORK_TREE=$HOME git'
alias cfg.e='GIT_DIR=$HOME/.myconf GIT_WORK_TREE=$HOME nvim'
@ -311,19 +317,4 @@ pmb() { pml $1 | awk -F/ '/\/usr\/bin\/.+[^/]$/{print $NF}' }
pmd() { pml $1 | grep -e '\.service$' -e '\.socket$' -e '\.timer$' -e '\.desktop$' }
# }}}
# {{{ kitty集成
if [[ -n "$KITTY_INSTALLATION_DIR" ]]; then
export KITTY_SHELL_INTEGRATION=enabled
autoload -Uz "$KITTY_INSTALLATION_DIR"/shell-integration/zsh/kitty-integration
kitty-integration
unfunction kitty-integration
fi
if ((Z_ENV_KITTY)); then
alias ssh='kitty +kitten ssh'
alias rg='kitty +kitten hyperlinked_grep'
alias icat='kitty +kitten icat'
fi
# }}}
# vim: foldmethod=marker:foldlevel=0