diff --git a/65-scripts.zsh b/65-scripts.zsh index d654da2..f5e2dc4 100644 --- a/65-scripts.zsh +++ b/65-scripts.zsh @@ -95,12 +95,13 @@ getip() { # для работы mc в терминале kitty будут перезаписаны mc-kitty-add() { local mc_cfg="${HOME}/.config/mc/ini" - 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 + [[ "$1" == "-f" ]] && sed -i '/\[terminal:xterm-kitty\]/,/^$/{d}' "${mc_cfg}" + if [ -w "${mc_cfg}" ]; then if ! grep -qF "[terminal:xterm-kitty]" "${mc_cfg}" ; then - cat "${mc_term}" >> "${mc_cfg}" + echo >> "${mc_cfg}" + echo "[terminal:xterm-kitty]" >> "${mc_cfg}" + echo "copy=xterm" >> "${mc_cfg}" fi fi } diff --git a/terminfo/mc-kitty.ini b/terminfo/mc-kitty.ini deleted file mode 100644 index c7ae62e..0000000 --- a/terminfo/mc-kitty.ini +++ /dev/null @@ -1,16 +0,0 @@ - -[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= - diff --git a/terminfo/xterm-kitty b/terminfo/xterm-kitty index 83fbb78..185d911 100644 Binary files a/terminfo/xterm-kitty and b/terminfo/xterm-kitty differ