-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzsh_setup.sh
executable file
·57 lines (45 loc) · 1.78 KB
/
zsh_setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env bash
# Some fonts
sudo apt-get -y install \
fonts-dejavu-core \
fonts-freefont-ttf \
fonts-inconsolata \
fonts-liberation \
fonts-font-awesome \
fonts-powerline
# Some icons
sudo apt-get -y install \
fonts-noto-color-emoji \
fonts-noto-color-emoji-core \
adwaita-icon-theme \
humanity-icon-theme \
faenza-icon-theme
# Install Oh My Zsh
# Remove existing zsh and oh-my-zsh
echo "Removing existing zsh and oh-my-zsh"
rm -rf ~/.oh-my-zsh
rm -rf ~/.zshrc
rm -rf ~/.p10k.zsh
rm -rf ~/powerlevel10k
# Zsh with Oh My Zsh
sudo apt update -y
sudo apt install zsh -y
# Change default shell to zsh for the vagrant user
echo "Changing default shell to zsh"
sudo usermod -s "$(which zsh)" vagrant
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# ZSH Theme
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#weird-things-happen-after-typing-source-zshrc
# git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
# echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc
# Manually run ~/.oh-my-zsh/oh-my-zsh.sh if this does not work
# Add scripts to default shell rc file: .zshrc
echo "Adding scripts to .zshrc"
echo "source /vagrant/auto_activate_venv_script.sh" >>~/.zshrc
echo "source /vagrant/.custom.zshrc" >>~/.zshrc
# Configure Powerlevel10k
echo "Configuring Powerlevel10k"
echo "Run p10k configure to configure Powerlevel10k"