-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.setup.sh
More file actions
executable file
·128 lines (110 loc) · 3.98 KB
/
.setup.sh
File metadata and controls
executable file
·128 lines (110 loc) · 3.98 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
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
#!/usr/bin/env zsh
#
# Installing software for use with the dot files in this repo
#
# To install the dot files in a clean home directory:
#
# cd $HOME
# alias dots='git --git-dir=$HOME/.dots.git/ --work-tree=$HOME'
# dots clone https://github.com/ipenguin/dotfiles.git
# dots checkout
#
set -eo pipefail
go_version="1.22.1"
delta_version="0.17.0"
nerdfont_ver="v3.0.0"
fonts=(FiraCode InconsolataGo UbuntuMono)
echo "Install applications"
sudo apt install -y \
bat \
cmake \
figlet \
npm \
openconnect \
python3.12-dev \
tmux \
vim \
zsh
sudo usermod -s /usr/bin/zsh $USER
# Set vim as the default editor
sudo update-alternatives --install /usr/bin/editor editor /usr/bin/vim.basic 100
if [ ! -d $HOME/.fzf ]
then
echo "--==[[ Install Fuzzy Finder ]]==--"
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install --bin --no-update-rc
fi
if [ ! -d $HOME/.pyenv ]
then
echo "--==[[ Install pyenv ]]==--"
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
fi
if [ ! -f $HOME/.local/bin/task ]
then
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
fi
if [ ! -f $HOME/.local/bin/delta ]
then
echo "--==[[ Install Delta ]]==--"
delta_pkg="delta-${delta_version}-x86_64-unknown-linux-gnu"
curl -L -o /tmp/${delta_pkg}.tar.gz \
https://github.com/dandavison/delta/releases/download/${delta_version}/${delta_pkg}.tar.gz
cd /tmp
/usr/bin/tar -zxf /tmp/${delta_pkg}.tar.gz
chmod +x /tmp/${delta_pkg}/delta
mv /tmp/${delta_pkg}/delta ~/.local/bin/
cd -
fi
if [ ! -d /usr/local/go ]
then
echo "--==[[ Installing Golang ]]==--"
curl https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz \
-o $HOME/.cache/go${go_version}.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf $HOME/.cache/go${go_version}.linux-amd64.tar.gz
fi
if [ ! -d $HOME/.oh-my-zsh ]
then
echo "--==[[ Install oh-my-zsh ]]==--"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh) --unattended --keep-zshrc"
echo "--==[[ Install oh-my-zsh plugins ]]==--"
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
fi
if [ ! -d "$HOME/.local/share/fonts" ]
then
mkdir -p $HOME/.local/share/fonts
fi
for f in $fonts
do
font="${f}NerdFontMono-Regular.ttf"
if [ ! -f "$HOME/.local/share/fonts/${font}" ]
then
wget https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/${f}/Regular/${font} \
-O $HOME/.local/share/fonts/${font}
fi
done
if [ ! -d $HOME/.oh-my-zsh/custom/themes/powerlevel10k ]
then
echo "--==[[ Install Powerlevel 10k ]]==--"
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
fi
if [ ! -d $HOME/.vim/bundle/Vundle.vim ]
then
echo "--==[[ Install Vundle ]]==--"
mkdir -p ~/.vim/bundle
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
fi
echo "--==[[ Install vim plugins ]]==--"
vim -c PluginInstall -c qall
if [ -d $HOME/.vim/bundle/YouCompleteMe ]
then
echo "--==[[ Compile YouCompleteMe ]]==--"
cd ~/.vim/bundle/YouCompleteMe
./install.py --go-completer --ts-completer
fi
echo "--==[[ Download Backgrounds ]]==--"
curl https://assets.science.nasa.gov/dynamicimage/assets/science/astro/universe/2023/09/web_first_images_release.png -o $HOME/Pictures/Carina-nebula.png
curl https://www.nasa.gov/wp-content/uploads/2024/10/gsfc-20171208-archive-e000102orig.png -o $HOME/Pictures/Supernova-1987a.png
curl https://www.nasa.gov/wp-content/uploads/2022/09/stsci-01ga76rm0c11w977jrhgj5j26x.png -o $HOME/Pictures/Tarantula.png
curl https://svs.gsfc.nasa.gov/vis/a010000/a013500/a013560/STSCI-H-p2016a-m-2000x1374.png -o $HOME/Pictures/Starbirth.png
curl https://science.nasa.gov/wp-content/uploads/2023/04/stsci-h-p1821a-m-1699x20001a.png -o $HOME/Pictures/Lagoon-nebula.png