Це стара версія документу!
Гарний сучасний термінал, працює в усіх десктопних ОС: Linux, Windows MacOs, FreeBSD.
можна через репозиторій:
curl -fsSL https://apt.fury.io/wez/gpg.key | sudo gpg --yes --dearmor -o /usr/share/keyrings/wezterm-fury.gpg echo 'deb [signed-by=/usr/share/keyrings/wezterm-fury.gpg] https://apt.fury.io/wez/ * *' | sudo tee /etc/apt/sources.list.d/wezterm.list sudo chmod 644 /usr/share/keyrings/wezterm-fury.gpg sudo apt update sudo apt install wezterm
brew install wezterm
sudo apt install zsh zsh-doc zsh-autosuggestions zsh-syntax-highlighting
в MacOS нічого не робити поки що
mkdir -p ~/.local/share/fonts cd /tmp wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.zip unzip JetBrainsMono.zip -d ~/.local/share/fonts/JetBrainsMono && rm JetBrainsMono.zip fc-cache -fv
Перевірка:
fc-list | grep -i "JetBrainsMono"
brew install font-jetbrains-mono-nerd-font
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
і перемкнутися на zsh (якщо цього не сталося автоматично):
zsh
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git \
${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
завантажити конфіг Powerlevel 10k config та зберегти в домашньому каталозі:
mv p10k_zsh ~/.p10k.zsh
Тепер додати в кінець .zshrc:
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
А на самий початок ~/.zshrc додати:
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
додамо корисні плагіни zsh-autosuggestions zsh-syntax-highlighting
brew install zsh-autosuggestions zsh-syntax-highlighting mkdir -pv ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/{zsh-autosuggestions,zsh-syntax-highlighting} ln -s $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh ln -s $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh
можливо, щось аналогічне треба зробити й для Лінукс
відкрити ~/.zshrc
plugins=( git terraform direnv z zsh-autosuggestions zsh-syntax-highlighting )
можна додати й інші плагіни, але обережно, це гальмує запуск терміналу
Щоб додати аліаси та інше, треба створити файл ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/my-aliases.zsh (ім'я на свій смак) і в нього додати:
alias dir="ls -a"
alias l="ls -la"
alias cw="clear; w"
alias x="exit"
alias cls="clear"
alias bc="bc -ql"
alias tt=traceroute
alias ports="sudo netstat -luntp"
alias play_alert="afplay ~/Sync/music/effects/Train\ Fx\ 2.wav"
alias myip="wget -O - -q icanhazip.com"
alias batcat="bat"
alias va='source ./venv/bin/activate'
alias ve='python3 -m venv ./venv'
alias list_instances="aws ec2 describe-instances --no-cli-pager --color off --filter Name=tag-key,Values=Name Name=instance-state-name,Values=running --query 'Reservations[*].Instances[*].{Instance_Id:InstanceId,Type:InstanceType,Public_IP:PublicIpAddress,Private_IP:PrivateIpAddress,SSH_Key:KeyName,Name:Tags[?Key==\`Name\`]|[0].Value}' --output table"
# Find top 5 big files
alias findbig="find . -type f -exec ls -s {} \; | sort -n -r | head -5"
# To clear all the history and screen
alias hcl='history -c; clear'
# Make basic commands verbose
alias cp="cp -v"
alias rm="rm -v"
alias mv="mv -v"
# To navigate to the different directories
alias ..='cd ..'
alias ...='cd ../..'
# Create and change to a new directory
mcd ()
{
if [ "$1" == "" ]; then
echo "mcd directory-name";
else
if [ ! -d $1 ]; then
mkdir $1;
cd $1;
else
echo "$1 directory exists";
fi;
fi
}
# display currently mounted file systems nicely
showmounted() { (echo "DEVICE PATH TYPE FLAGS" && mount | awk '$2=$4="";1') | column -t; }
# Local aliases
alias gfo="git fetch origin && git status"
alias zimdate="LC_TIME=en_US.UTF-8 date '+Week %V%n%A, %d.%m.%Y'"
alias apg1="apg -a 0 -n 1 -m 8 -x 10 -M NCL -E I1l0O"
alias apg2="apg -a 0 -n 1 -m 14 -x 16 -M NCL -E I1l0O"
alias apg3="apg -a 0 -n 1 -m 14 -x 16 -M NCLS -E I1l0O"
* WezTerm official site