-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpowerlevel_installation.sh
More file actions
55 lines (47 loc) · 1.74 KB
/
powerlevel_installation.sh
File metadata and controls
55 lines (47 loc) · 1.74 KB
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
#!/usr/bin/env bash
if [ -z {DOTFILES_PATH} ];
source ./print.sh;
else
source $DOTFILES_PATH/print.sh
fi
function install_powerlevel()
{
if [[ ! $SHELL == "/bin/zsh" ]]; then
if [[ "$(command -v zsh)" ]]; then
error "ZSH is not installed on your system. Install it before running this script."
return
fi
if questionY "Set default shell to ZSH"
then
chsh -s $(which zsh)
fi
fi
if ! questionY "Do you want to install powerlevel"
then
return
fi
if questionY "Install powerline fonts"
then
$DOTFILES_PATH/PowerlineFonts/install.sh
fi
# Install oh-my-zsh if it isn't
if [ ! -d $HOME/.oh-my-zsh ]; then
if [[ "$(command -v curl)" ]]; then
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
elif [[ "$(command -v wget)" ]]; then
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
else
error "Install curl or wget before installing powerlevel"
fi
fi
if [ ! -d ~/.oh-my-zsh/custom/themes/powerlevel9k ]; then
running "Cloning powerlevel to your .oh-my-zsh folder."
git clone --quiet https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
ok
fi
info "Installing auto suggestions"
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
info "Installing syntax highlighting"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
}
install_powerlevel