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
|
||||
# }}}
|
||||
|
||||
if command -v bat >/dev/null; then
|
||||
export PAGER=bat
|
||||
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||
fi
|
||||
|
||||
# Uncrustify
|
||||
export UNCRUSTIFY_CONFIG="${XDG_CONFIG_HOME}/uncrustify/uncrustify.cfg"
|
||||
[ ! -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"
|
||||
|
||||
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"
|
||||
zcompile "${ZINIT[HOME_DIR]}/zinit.zsh"
|
||||
fi
|
||||
|
@ -3,7 +3,8 @@
|
||||
|
||||
# Обновление конфигурации zsh, менеджера zinit и плагинов
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -67,6 +67,11 @@ alias gur="git pull --recurse-submodules"
|
||||
alias gsui="git submodule update --recursive --init"
|
||||
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)
|
||||
alias -g N1='1>/dev/null'
|
||||
alias -g N2='2>/dev/null'
|
||||
|
@ -4,7 +4,7 @@
|
||||
# где отсутствует пакет kitty-terminfo
|
||||
fix-kitty-terminal-support() {
|
||||
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
|
||||
|
16
install.sh
16
install.sh
@ -2,17 +2,19 @@
|
||||
|
||||
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
|
||||
|
||||
cat <<EOF > $HOME/.zshenv
|
||||
# Загрузка конфигурации из каталога $ZDOTDIR
|
||||
export ZDOTDIR=$HOME/.config/zsh
|
||||
source $ZDOTDIR/.zshenv
|
||||
# Загрузка конфигурации из каталога \$ZDOTDIR
|
||||
export ZDOTDIR=\$HOME/.config/zsh
|
||||
source \$ZDOTDIR/.zshenv
|
||||
EOF
|
||||
|
||||
sudo usermod -s $(which zsh) $(whoami)
|
||||
|
||||
mkdir -p ~/.local/share/fonts
|
||||
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
|
||||
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
|
||||
TEMP="${XDG_RUNTIME_DIR:-/tmp}"
|
||||
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/
|
||||
sudo dpkg -i "$TEMP"/fonts-iosevka-prog-nerd_*_all.deb
|
||||
rm -f "$TEMP"/fonts-iosevka-prog-nerd_*_all.deb
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user