Користувальницькькі налаштування

Налаштування сайту


software:os:terminal:wezterm

Розбіжності

Тут показані розбіжності між вибраною ревізією та поточною версією сторінки.

Посилання на цей список змін

Порівняння попередніх версій Попередня ревізія
Наступна ревізія
Попередня ревізія
software:os:terminal:wezterm [2026/03/09 16:47]
charon [Для всіх]
software:os:terminal:wezterm [2026/03/09 18:59] (поточний)
charon [Убунту]
Рядок 59: Рядок 59:
 fi fi
 </code> </code>
-===== Додаткові налаштування Zsh ===== 
-==== MacOS ==== 
-додамо корисні плагіни zsh-autosuggestions zsh-syntax-highlighting 
-<code bash> 
-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 
-</code> 
-можливо, щось аналогічне треба зробити й для Лінукс 
  
-==== Для всіх ==== +===== Додаткові налаштування Zsh: Аліаси ===== 
-відкрити ~/.zshrc +основна ідея в тому, щоб покласти файли з розширенням //.zsh// в каталог //~/.oh-my-zsh/custom// 
-<code> +==== Усі ====
-plugins=( +
-  git +
-  terraform +
-  direnv +
-  z +
-  zsh-autosuggestions +
-  zsh-syntax-highlighting +
-+
-</code> +
-можна додати й інші плагіни, але обережно, це гальмує запуск терміналу +
- +
-Щоб додати аліаси та інше, треба створити файл //${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/my-aliases.zsh// (ім'я на свій смак) і в нього додати:+
 <file zsh my-aliases.zsh> <file zsh my-aliases.zsh>
 alias dir="ls -a" alias dir="ls -a"
Рядок 99: Рядок 77:
 alias va='source ./venv/bin/activate' alias va='source ./venv/bin/activate'
 alias ve='python3 -m venv ./venv' 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"+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 # Find top 5 big files
Рядок 141: Рядок 119:
 alias apg3="apg -a 0 -n 1 -m 14 -x 16 -M NCLS -E I1l0O" alias apg3="apg -a 0 -n 1 -m 14 -x 16 -M NCLS -E I1l0O"
 </file> </file>
 +
 +==== MacOS ====
 +<file zsh my-aliases.zsh>
 +# Exit if it's not MacOS
 +[[ "$(uname -s)" != "Darwin" ]] && return
 +
 +# Configuration if Brew installed
 +() {
 +    local bp=""
 +    [[ -x /opt/homebrew/bin/brew ]] && bp="/opt/homebrew"
 +    [[ -x /usr/local/bin/brew ]] && bp="/usr/local"
 +
 +    if [[ -n "$bp" ]]; then
 +        export HOMEBREW_AUTO_UPDATE_SECS=86400
 +        export HOMEBREW_NO_ANALYTICS=1
 +
 +        if (( $+commands[gls] )); then
 +            # Використовуємо локальну змінну для аліасів
 +            alias ls="$bp/bin/gls --color=never -F --group-directories-first"
 +            alias date="$bp/bin/gdate"
 +        else
 +                [[ -t 1 ]] && echo "\e[33mNotice:\e[0m Coreutils not found. Run: brew install coreutils"
 +        fi
 +    fi
 +}
 +
 +alias openfinder='open -a Finder $1'
 +alias flushdns='sudo dscacheutil -flushcache'
 +alias cleanup="find . -type f -name '*.DS_Store' -ls -delete" # This alias will find and delete all ".DS_Store" files in the current directory and all subdirectories.
 +alias battery="pmset -g batt | grep -Eo '[0-9]+%' | sed 's/%//'"
 +</file>
 +
 +==== Убунту ====
 +<file zsh my-aliases-ubuntu.zsh>
 +alias ls='/bin/ls --color=never -F --group-directories-first'
 +alias pbcopy="$HOME/scripts/stub_pbcopy.sh"
 +alias monitor_turn_off='xset dpms force off'
 +alias play_sound='aplay ~/Music/effects/Train\ Fx\ 2.wav'
 +alias psc='ps xawf -eo pid,user,cgroup,args'
 +alias pss='systemd-cgls'
 +alias tree='tree -C --dirsfirst'
 +
 +if [[ -f /etc/os-release ]]; then
 +        if grep -q "^ID=ubuntu$" /etc/os-release; then
 +                alias update="$HOME/scripts/update.sh"
 +                alias update_small="sudo apt upgrade --assume-yes"
 +                alias update_download_only="sudo apt update && sudo apt upgrade --download-only --assume-yes"
 +        elif grep -q "^ID=debian$" /etc/os-release; then
 +                alias update="sudo apt update && sudo apt upgrade --assume-yes"
 +                alias update_download_only="sudo apt update && sudo apt upgrade --download-only --assume-yes"
 +        fi
 +fi
 +</file>
 +
 +==== MacOS ====
 +додамо корисні плагіни zsh-autosuggestions zsh-syntax-highlighting
 +<code bash>
 +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
 +</code>
 +можливо, щось аналогічне треба зробити й для Лінукс
 +
 +==== Для всіх ====
 +відкрити ~/.zshrc
 +<code>
 +plugins=(
 +  git
 +  terraform
 +  direnv
 +  z
 +  zsh-autosuggestions
 +  zsh-syntax-highlighting
 +)
 +</code>
 +можна додати й інші плагіни, але обережно, це гальмує запуск терміналу
 +
 +Щоб додати аліаси та інше, треба створити файл //${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/my-aliases.zsh// (ім'я на свій смак) і в нього додати:
  
 ===== Посилання ===== ===== Посилання =====
  * [[https://wezterm.org/|WezTerm]] official site  * [[https://wezterm.org/|WezTerm]] official site
software/os/terminal/wezterm.1773067658.txt.gz · Востаннє змінено: 2026/03/09 16:47 повз charon