-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_zsh.sh
executable file
·30 lines (24 loc) · 1.27 KB
/
install_zsh.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
#!/bin/bash
aptyes='sudo DEBIAN_FRONTEND=noninteractive apt-get -y '
# Install shell
$aptyes install zsh
# attended install
# Don't run zsh at the end, since more installations are needed afterwards
env RUNZSH=no KEEP_ZSHRC=yes sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# zsh Plugins
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
git clone https://github.com/zdharma-continuum/fast-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting
git clone --depth=1 https://github.com/marlonrichert/zsh-autocomplete.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autocomplete
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
# Add flavors
mv ~/.zshrc ~/.zshrc.vanilla
ln -s ~/settings/zshrc ~/.zshrc
# Making default shell
# For not making default, put some cmd arg
# Making default shell
if [ $# -eq 0 ]; then
sudo usermod -s /bin/zsh $USER
fi
# fix permissions on shared permises
chmod -R g-w,o-w ~/.oh-my-zsh