From 4c9802e35b0284d1b8c2a5d637302a0d2fcca9f3 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Fri, 17 Dec 2021 10:39:37 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=BF=D0=B8=D1=81?= =?UTF-8?q?=D0=B0=D0=BD=D1=8B=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D0=B8?= =?UTF-8?q?=20=D0=B4=D0=BB=D1=8F=20=D0=BE=D0=B1=D0=B5=D1=81=D0=BF=D0=B5?= =?UTF-8?q?=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=81=D0=BE=D0=B2=D0=BC=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D0=B8=D0=BC=D0=BE=D1=81=D1=82=D0=B8=20=D1=81=20mc?= =?UTF-8?q?=20=D0=B8=20kitty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 65-scripts.zsh | 21 ++++----------------- 95-finish.zsh | 10 ++++++++-- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/65-scripts.zsh b/65-scripts.zsh index fb0fbf0..2e6f0fe 100644 --- a/65-scripts.zsh +++ b/65-scripts.zsh @@ -85,23 +85,10 @@ getip() { fi } -# Автоматическая установка описания терминала xterm-kitty -kitty-install-terminfo() { - 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." -} - -if [[ "x${TERM}" = "xxterm-kitty" ]] || [[ "x${TERM}" == *"screen"* ]] || [[ "x${TERM}" == *"tmux"* ]]; then - if infocmp "xterm-kitty" > /dev/null 2>&1 ; then - unset -f kitty-install-terminfo - fi -fi - -# Настройка mc для работы в kitty (mc не должен быть запущен) +# Настройка mc для работы в терминале kitty +# Необходимо закрыть все экземпляры mc для текущего пользователя +# При вызове функции с параметром -f текущие настройки клавиш +# для работы mc в терминале kitty будут перезаписаны mc-kitty-add() { local mc_cfg="${HOME}/.config/mc/ini" local mc_term="${ZDOTDIR}/terminfo/mc-kitty.ini" diff --git a/95-finish.zsh b/95-finish.zsh index 12023b3..4212506 100644 --- a/95-finish.zsh +++ b/95-finish.zsh @@ -1,5 +1,11 @@ zcomet compinit -mc-kitty-add -if type 'kitty-install-terminfo' 2>/dev/null | grep -q 'function'; then kitty-install-terminfo; fi +# Обеспечение совместимости с терминалом kitty +# По возможности следует установить пакет kitty-terminfo +if ! infocmp "xterm-kitty" > /dev/null 2>&1 ; then + mkdir -p "${HOME}/.terminfo/x" + cp -ap "${ZDOTDIR}/terminfo/xterm-kitty" "${HOME}/.terminfo/x" + echo "Terminal description for xterm-kitty was installed." + echo "Close terminal and start again." +fi