-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zsh.sh
43 lines (34 loc) · 1.26 KB
/
.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
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env bash
# Install command-line tools using Homebrew.
# Ask for the administrator password upfront.
sudo -v
# Keep-alive: update existing `sudo` time stamp until the script has finished.
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# Check for Homebrew,
# Install if we don't have it
if test ! $(which brew); then
echo "------------------------------"
echo "Installing Homebrew package manager"
echo "------------------------------"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Make sure we’re using the latest Homebrew.
brew update && brew upgrade
# Install Zsh
brew install zsh
# Install Oh My Zsh
if [[ ! -d ~/.oh-my-zsh ]]
then
echo "------------------------------"
echo "Installing Oh My Zsh"
echo "------------------------------"
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
fi
# Install Powerline10k zsh theme
echo "------------------------------"
echo "Installing powerlevel10k theme"
echo "------------------------------"
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
brew install romkatv/powerlevel10k/powerlevel10k
# Install ColorLs
gem install colorls