dots/install.sh

54 lines
1.5 KiB
Bash
Raw Normal View History

2025-01-09 16:06:36 +03:00
#!/bin/bash
2025-01-10 08:28:52 +03:00
set -x
2025-01-09 16:06:36 +03:00
apt-get update
2025-01-09 19:59:04 +03:00
apt-get install -y curl git tmux zsh zsh-syntax-highlighting
2025-01-09 16:06:36 +03:00
# 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
2025-01-10 09:29:00 +03:00
RUNZSH='no'
2025-01-10 08:28:52 +03:00
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
2025-01-09 16:06:36 +03:00
# 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
# PowerLevel10K
apt-get install -y fontconfig
mkdir -p ~/.local/share/fonts
curl -OL https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.tar.xz
tar -xvf JetBrainsMono.tar.xz -C ~/.local/share/fonts
rm JetBrainsMono.tar.xz
fc-cache
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
sed -i 's/^ZSH_THEME=.*/ZSH_THEME="powerlevel10k\/powerlevel10k"/g' ~/.zshrc
2025-01-09 19:55:36 +03:00
# Aliases
cat << EOF >> ~/.aliases
.aliases
alias ip='ip --color=auto'
alias ssht='ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
EOF
# .bashrc
cat << EOF >> ~/.bashrc
if [ -f ~/.aliases ]; then
. ~/.aliases
fi
EOF
# zshrc
cat << EOF >> ~/.zshrc
source $HOME/.aliases
EOF