Команды для настройки kitty и mc
This commit is contained in:
parent
ab498eb5a9
commit
e6e01d8917
11
05-start.zsh
11
05-start.zsh
@ -1,12 +1 @@
|
|||||||
# Автоматическая установка описания терминала xterm-kitty
|
|
||||||
if [[ "x${TERM}" = "xxterm-kitty" ]]; then
|
|
||||||
if ! infocmp "xterm-kitty" > /dev/null 2>&1 ; then
|
|
||||||
if ! sudo apt-get install kitty-terminfo > /dev/null 2>&1 ; then
|
|
||||||
mkdir -p "${HOME}/.terminfo/x"
|
|
||||||
cp -ap "${ZDOTDIR}/terminfo/xterm-kitty" "${HOME}/.terminfo/x"
|
|
||||||
fi
|
|
||||||
echo "Terminal description for xterm-kitty was installed."
|
|
||||||
echo "Close terminal and start again."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
@ -84,3 +84,31 @@ getip() {
|
|||||||
ifconfig | awk '/inet /{print $2}' | command grep -v 127.0.0.1
|
ifconfig | awk '/inet /{print $2}' | command grep -v 127.0.0.1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Автоматическая установка описания терминала xterm-kitty
|
||||||
|
kitty-install-terminfo() {
|
||||||
|
if [[ "x${TERM}" = "xxterm-kitty" ]]; then
|
||||||
|
if ! infocmp "xterm-kitty" > /dev/null 2>&1 ; then
|
||||||
|
if ! sudo apt-get install kitty-terminfo > /dev/null 2>&1 ; then
|
||||||
|
mkdir -p "${HOME}/.terminfo/x"
|
||||||
|
cp -ap "${ZDOTDIR}/terminfo/xterm-kitty" "${HOME}/.terminfo/x"
|
||||||
|
fi
|
||||||
|
echo "Terminal description for xterm-kitty was installed."
|
||||||
|
echo "Close terminal and start again."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Настройка mc для работы в kitty (mc не должен быть запущен)
|
||||||
|
mc-kitty-add() {
|
||||||
|
local mc_cfg="${HOME}/.config/mc/ini.test"
|
||||||
|
local mc_term="${ZDOTDIR}/terminfo/mc-kitty.ini"
|
||||||
|
|
||||||
|
[[ "x$1" == "x-f" ]] && sed -i '/\[terminal:xterm-kitty\]/,/^$/{d}' "${mc_cfg}"
|
||||||
|
if [ -w "${mc_cfg}" -a -r "${mc_term}" ]; then
|
||||||
|
if ! grep -qF "[terminal:xterm-kitty]" "${mc_cfg}" ; then
|
||||||
|
cat "${mc_term}" >> "${mc_cfg}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -1,2 +1,5 @@
|
|||||||
zcomet compinit
|
zcomet compinit
|
||||||
|
|
||||||
|
mc-kitty-add
|
||||||
|
kitty-install-terminfo
|
||||||
|
|
||||||
|
16
terminfo/mc-kitty.ini
Normal file
16
terminfo/mc-kitty.ini
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
[terminal:xterm-kitty]
|
||||||
|
f11=\\e[1\;2P
|
||||||
|
f12=\\e[1\;2Q
|
||||||
|
f13=\\e[1\;2R
|
||||||
|
f14=\\e[1\;2S
|
||||||
|
f15=\\e[15\;2~
|
||||||
|
f16=\\e[17\;2~
|
||||||
|
f17=\\e[18\;2~
|
||||||
|
f18=\\e[19\;2~
|
||||||
|
f19=\\e[20\;2~
|
||||||
|
f20=\\e[21\;2~
|
||||||
|
complete=\\e^i
|
||||||
|
backtab=\\e[Z
|
||||||
|
backspace=
|
||||||
|
|
Loading…
Reference in New Issue
Block a user