-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.sh
executable file
·72 lines (59 loc) · 1.92 KB
/
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
if [[ $(command -v brew) == "" ]]; then
echo "Installing Hombrew"
export NONINTERACTIVE=1
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
elif "$OSTYPE" == "darwin"* ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
brew update
else
echo "Updating Homebrew"
brew update
fi
if [[ "$OSTYPE" == "linux-gnu"* ]] && [[ $(command -v apt) != "" ]]; then
sudo apt install -y zsh
# install neovim dependencies
# The dependencies break if on ubuntu and installed with brew, so here we use apt
sudo apt-get install -y ninja-build gettext cmake unzip curl build-essential
else
brew install zsh
# install neovim dependencies
brew install ninja cmake gettext curl unzip
fi
brew install wget nodejs npm tmux ffind ripgrep jq vivid bat eza zoxide git-delta stow
mkdir -p ~/.config
if [[ $(command -v nvim) == "" ]]; then
(
git clone --depth 1 -b v0.10.1 https://github.com/neovim/neovim
cd neovim && make CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make install
cd ../
rm -rf neovim
)
fi
(
git clone https://github.com/catppuccin/zsh-syntax-highlighting.git ~/.zsh-catpuccin
)
(
mkdir -p "$(bat --config-dir)/themes"
wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Mocha.tmTheme
bat cache --build
)
(
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install --key-bindings --completion --update-rc
)
git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm
mv ~/.zshrc ~/.zshrc_old
stow -v --adopt -t $HOME home
git restore home/.zshrc
(
nvim --headless "+Lazy! sync" +qa
)
~/.config/tmux/plugins/tpm/bin/install_plugins
sudo chsh -s $(which zsh)
zsh -l
echo "Done!"