-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.sh
39 lines (24 loc) · 1.11 KB
/
shell.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
if [[ "$OSTYPE" == "darwin"* ]]; then # mac
brew install wget
fi
sudo wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh
sudo chmod +x /usr/local/bin/oh-my-posh
mkdir ~/.poshthemes
cp mytheme.json ~/.poshthemes/mytheme.json
chmod u+rw ~/.poshthemes/*.json
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
mv ~/.zshrc ~/.zshrc_oh
mv ~/.zshrc.pre-oh-my-zsh ~/.zshrc
sed -i -e '$aeval "$(oh-my-posh --init --shell zsh --config ~/.poshthemes/mytheme.json)"' ~/.zshrc
curl -L git.io/antigen > ~/antigen.zsh
sed -i '1 i\source $ZSH/oh-my-zsh.sh' ~/.zshrc
sed -i '1 i\plugins=()' ~/.zshrc
sed -i '1 i\antigen apply' ~/.zshrc
sed -i '1 i\antigen bundle zsh-users/zsh-autosuggestions' ~/.zshrc
sed -i '1 i\antigen bundle zsh-users/zsh-syntax-highlighting' ~/.zshrc
sed -i '1 i\antigen bundle "MichaelAquilina/zsh-you-should-use"' ~/.zshrc
sed -i '1 i\antigen use oh-my-zsh' ~/.zshrc
sed -i '1 i\ZSH_THEME=""' ~/.zshrc
sed -i '1 i\export ZSH="~/.oh-my-zsh"' ~/.zshrc
sed -i '1 i\source ~/antigen.zsh' ~/.zshrc
source ~/.zshrc