#!/bin/bash #set -x sudo apt-get update sudo apt-get install -y curl git tmux zsh zsh-syntax-highlighting # Tmux config curl --create-dirs -fLo \ ~/.config/tmux/tmux.conf \ https://git.da2001.ru/da2001/dots/raw/branch/main/.config/tmux/tmux.conf # Install Oh My Zsh sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended sed -i 's/^ZSH_THEME=.*/ZSH_THEME="tjkirch"/g' ~/.zshrc # Install zsh-syntax-highlighting echo "source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc # Install zsh-autosuggestions git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions sed -i 's/^plugins=.*[^\)]/& zsh-autosuggestions/g' ~/.zshrc # Aliases echo "Create => .aliases" cat << EOF >> ~/.aliases alias ip='ip --color=auto' alias ssht='ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' alias gp="git add -A && git commit -m "modify: $(date)" && git push" EOF echo "Add link .aliases to .bashrc" cat << EOF >> ~/.bashrc if [ -f ~/.aliases ]; then . ~/.aliases fi EOF echo "Add link .aliases to .zshrc" cat << EOF >> ~/.zshrc source ~/.aliases EOF # Shell to zsh echo "Change shell for $USER" sudo -k chsh -s "$(which zsh)" "$USER" # -k forces the password prompt echo "ALL Done. Relogin for apply settings."