-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·153 lines (128 loc) · 3.71 KB
/
install.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#!/bin/bash
# Installing Nerd Font
install_nerdfont() {
echo "Work: Installing nerd fonts"
echo "Creating folder for fonts at ~/.local/share/fonts"
mkdir -p ~/.local/share/fonts
echo "Created folder for fonts at ~/.local/share/fonts"
echo "Fetching Fira Code Nerd Font"
cd ~/.local/share/fonts && curl -fLo "Fira Code Regular Nerd Font Complete.ttf" https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/FiraCode/Regular/complete/Fira%20Code%20Regular%20Nerd%20Font%20Complete.ttf
echo "Finished downloading Fira Code Nerd Font"
echo "Fetching JetBrainsMono"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/install_manual.sh)"
echo "Finished downloading JetBrainsMono"
# Use the all .fonts
# fc-cache -fv
# Attach JetBrains
# fc-cache -fv .local/share/fonts/JetBrainsMono
echo "Done: Installing nerd fonts!"
}
# Installing FZF
install_fzf() {
echo "Work: Installing FZF"
# [ ] - meaning test the command inside of the brackets
[ -n "$(cat /etc/os-release | grep Ubuntu)" ] && install_fzf_on_ubuntu
[ -f "/etc/arch-release" ] && install_fzf_on_arch
[[ $OSTYPE == 'darwin'* ]] && install_fzf_on_mac
echo "Done: Installing FZF"
}
install_fzf_on_arch() {
echo "Installing fzf on arch"
sudo pacman -S fzf
sudo pacman -S ripgrep
# yay -S universal-ctags-git
sudo pacman -S the_silver_searcher
pacman -S fd
}
install_fzf_on_ubuntu() {
echo "Installing fzf on ubuntu"
sudo apt install fzf
sudo apt install ripgrep
sudo apt install universal-ctags
sudo apt install silversearcher-ag
sudo apt install fd-find
}
install_fzf_on_mac() {
echo "Installing fzf on mac"
brew install fzf
brew install fd
brew install ripgrep
brew install universal-ctags
brew install the_silver_searcher
}
# Installing tmux
install_tmux() {
echo "Work: Installing tmux"
[ -n "$(cat /etc/os-release | grep Ubuntu)" ] && install_tmux_on_ubuntu
[ -f "/etc/arch-release" ] && install_tmux_on_arch
[[ $OSTYPE == 'darwin'* ]] && install_tmux_on_mac
echo "Work: Copy .tmux.conf"
cp ./tmux/.tmux.conf $HOME/.tmux.conf
echo "Done: Installing tmux"
}
install_tmux_on_ubuntu() {
echo "Installing tmux on ubuntu"
sudo apt-get install tmux
sudo apt-get install -y xclip
}
install_tmux_on_arch() {
echo "Installing tmux on arch"
sudo pacman -S tmux
sudo pacman -S xclip
}
install_tmux_on_mac() {
echo "Installing tmux on mac"
brew install tmux
brew install xclip
}
# Install Delta - git syntax highlight
install_delta() {
echo "Work: Installing delta"
# TODO: setup for ubuntu
# [ -n "$(cat /etc/os-release | grep Ubuntu)" ] && install_delta_on_ubuntu
[ -f "/etc/arch-release" ] && install_delta_on_arch
[[ $OSTYPE == 'darwin'* ]] && install_delta_on_mac
echo "Done: Installing delta"
}
install_delta_on_arch() {
echo "Installing delta on arch"
sudo pacman -S git-delta
}
install_delta_on_mac() {
echo "Installing delta on mac"
brew install git-delta
}
install_lazygit() {
echo "Work: Installing lazygit"
[ -f "/etc/arch-release" ] && install_lazygit_on_arch
[[ $OSTYPE == 'darwin'* ]] && install_lazygit_on_mac
echo "Work: Copy lazygit config.yml"
cp ./lazygit/config.yml $HOME/.config/lazygit/
echo "Done: Installing lazygit"
}
install_lazygit_on_arch() {
echo "Installing lazygit on arch"
sudo pacman -S lazygit
}
install_lazygit_on_mac() {
echo "Installing lazygit on mac"
brew install lazygit
}
setup() {
echo "Starting to setup.."
# install_nerdfont
install_fzf
# install_tmux
# install_delta
# install_lazygit
# TODO copy alacrity config
echo "Done"
}
# TODO
# - attach bash_aliases on .bashrc
# echo "code to input" >> ~./bashrc
# - alacritty
# - neovim
# - docker
# Execute setup
setup