Merge branch 'master' of git.246060.ru:config/zsh
This commit is contained in:
commit
312733c575
5
.zshenv
5
.zshenv
@ -53,6 +53,11 @@ if [[ -n ${DISPLAY+set} ]]; then
|
|||||||
fi
|
fi
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
if command -v bat >/dev/null; then
|
||||||
|
export PAGER=bat
|
||||||
|
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||||
|
fi
|
||||||
|
|
||||||
# Uncrustify
|
# Uncrustify
|
||||||
export UNCRUSTIFY_CONFIG="${XDG_CONFIG_HOME}/uncrustify/uncrustify.cfg"
|
export UNCRUSTIFY_CONFIG="${XDG_CONFIG_HOME}/uncrustify/uncrustify.cfg"
|
||||||
[ ! -r "${UNCRUSTIFY_CONFIG}" ] && unset UNCRUSTIFY_CONFIG
|
[ ! -r "${UNCRUSTIFY_CONFIG}" ] && unset UNCRUSTIFY_CONFIG
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
# shellcheck shell=bash
|
|
||||||
# vim: ft=sh
|
|
||||||
|
|
||||||
setopt AUTO_PUSHD # Push the current directory visited on the stack.
|
|
||||||
setopt PUSHD_IGNORE_DUPS # Do not store duplicates in the stack.
|
|
||||||
setopt PUSHD_SILENT # Do not print the directory stack after pushd or popd.
|
|
||||||
|
|
||||||
autoload -Uz allopt zed zmv zcalc colors is-at-least
|
|
||||||
colors
|
|
||||||
|
|
||||||
zmodload zsh/terminfo
|
|
||||||
|
|
||||||
autoload -Uz edit-command-line
|
|
||||||
zle -N edit-command-line
|
|
||||||
|
|
||||||
autoload -Uz select-word-style
|
|
||||||
select-word-style shell
|
|
||||||
|
|
||||||
if [ -z ${DISABLE_MAGIC_FUNCTIONS+set} ]; then
|
|
||||||
if is-at-least 5.1; then
|
|
||||||
autoload -Uz bracketed-paste-magic
|
|
||||||
zle -N bracketed-paste bracketed-paste-magic
|
|
||||||
fi
|
|
||||||
autoload -Uz url-quote-magic
|
|
||||||
zle -N self-insert url-quote-magic
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Подсветка вывода основных команд
|
|
||||||
if [[ -r /etc/grc.zsh ]]; then source /etc/grc.zsh; fi
|
|
||||||
|
|
@ -10,7 +10,7 @@ ZINIT[ZCOMPDUMP_PATH]="$ZSH_CACHE_DIR/zcompdump"
|
|||||||
ZPFX="$ZSH_CACHE_DIR/polaris"
|
ZPFX="$ZSH_CACHE_DIR/polaris"
|
||||||
|
|
||||||
if [ ! -d "${ZINIT[HOME_DIR]}" ]; then
|
if [ ! -d "${ZINIT[HOME_DIR]}" ]; then
|
||||||
wget -q -O - "https://github.com/zdharma-continuum/zinit/archive/refs/tags/v${ZINIT[VERSION]}.tar.gz" | tar zxf - -C "$ZSH_CACHE_DIR"
|
curl -sL "https://github.com/zdharma-continuum/zinit/archive/refs/tags/v${ZINIT[VERSION]}.tar.gz" | tar zxf - -C "$ZSH_CACHE_DIR"
|
||||||
sed -i 's/.*zinit-self-update -q//' "${ZINIT[HOME_DIR]}/zinit-autoload.zsh"
|
sed -i 's/.*zinit-self-update -q//' "${ZINIT[HOME_DIR]}/zinit-autoload.zsh"
|
||||||
zcompile "${ZINIT[HOME_DIR]}/zinit.zsh"
|
zcompile "${ZINIT[HOME_DIR]}/zinit.zsh"
|
||||||
fi
|
fi
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
# Обновление конфигурации zsh, менеджера zinit и плагинов
|
# Обновление конфигурации zsh, менеджера zinit и плагинов
|
||||||
zu() {
|
zu() {
|
||||||
git -C "${ZDOTDIR}" pull && zinit update --parallel --all
|
git -C $ZDOTDIR rev-parse 2>/dev/null && git -C $ZDOTDIR pull
|
||||||
|
zinit update --parallel --all
|
||||||
exec zsh
|
exec zsh
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,6 +67,11 @@ alias gur="git pull --recurse-submodules"
|
|||||||
alias gsui="git submodule update --recursive --init"
|
alias gsui="git submodule update --recursive --init"
|
||||||
alias gsur="git submodule update --recursive --init --remote"
|
alias gsur="git submodule update --recursive --init --remote"
|
||||||
|
|
||||||
|
alias ycal="ncal $(date +%Y)"
|
||||||
|
|
||||||
|
# gdu вместо ncdu
|
||||||
|
command -v gdu > /dev/null 2>&1 && alias ncdu=gdu
|
||||||
|
|
||||||
# Фильтры (H,T,G,L определены в common-aliases)
|
# Фильтры (H,T,G,L определены в common-aliases)
|
||||||
alias -g N1='1>/dev/null'
|
alias -g N1='1>/dev/null'
|
||||||
alias -g N2='2>/dev/null'
|
alias -g N2='2>/dev/null'
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# где отсутствует пакет kitty-terminfo
|
# где отсутствует пакет kitty-terminfo
|
||||||
fix-kitty-terminal-support() {
|
fix-kitty-terminal-support() {
|
||||||
mkdir -p $HOME/.terminfo/x
|
mkdir -p $HOME/.terminfo/x
|
||||||
wget -qO - https://github.com/kovidgoyal/kitty/raw/master/terminfo/x/xterm-kitty > $HOME/.terminfo/x/xterm-kitty
|
curl -fsSL https://github.com/kovidgoyal/kitty/raw/master/terminfo/x/xterm-kitty > $HOME/.terminfo/x/xterm-kitty
|
||||||
}
|
}
|
||||||
|
|
||||||
# Настройка mc для работы в терминале kitty
|
# Настройка mc для работы в терминале kitty
|
||||||
|
16
install.sh
16
install.sh
@ -2,17 +2,19 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
sudo apt-get install git zsh
|
sudo apt-get install git zsh curl wget
|
||||||
git clone https://git.246060.ru/config/zsh $HOME/.config/zsh
|
git clone https://git.246060.ru/config/zsh $HOME/.config/zsh
|
||||||
|
|
||||||
cat <<EOF > $HOME/.zshenv
|
cat <<EOF > $HOME/.zshenv
|
||||||
# Загрузка конфигурации из каталога $ZDOTDIR
|
# Загрузка конфигурации из каталога \$ZDOTDIR
|
||||||
export ZDOTDIR=$HOME/.config/zsh
|
export ZDOTDIR=\$HOME/.config/zsh
|
||||||
source $ZDOTDIR/.zshenv
|
source \$ZDOTDIR/.zshenv
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
sudo usermod -s $(which zsh) $(whoami)
|
sudo usermod -s $(which zsh) $(whoami)
|
||||||
|
|
||||||
mkdir -p ~/.local/share/fonts
|
TEMP="${XDG_RUNTIME_DIR:-/tmp}"
|
||||||
curl -fSL -o "$HOME/.local/share/fonts/Anonymice Nerd Font Complete.ttf" https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/AnonymousPro/complete/Anonymice%20Nerd%20Font%20Complete.ttf
|
wget -P "$TEMP" -c -r -nd --no-parent -A "fonts-iosevka-prog-nerd_*_all.deb" https://deb.246060.ru/bin/fonts/pool/main/f/fonts-iosevka-prog-nerd/
|
||||||
curl -fSL -o "$HOME/.local/share/fonts/Anonymice Nerd Font Complete Mono.ttf" https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/AnonymousPro/complete/Anonymice%20Nerd%20Font%20Complete%20Mono.ttf
|
sudo dpkg -i "$TEMP"/fonts-iosevka-prog-nerd_*_all.deb
|
||||||
|
rm -f "$TEMP"/fonts-iosevka-prog-nerd_*_all.deb
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user