/
/
/
1#!/bin/bash
2sudo apt install -y git zsh tmux unzip python3-pip perl
3
4pip3
5
6home_dir=/home/${USER}
7temp_dir=${home_dir}/tmp
8code_dir=${home_dir}/personal/misc_code
9local_bin_dir=${home_dir}/.local/bin
10local_app_dir=${home_dir}/.local/share/applications
11local_icon_dir=${home_dir}/.local/share/icons/hicolor/apps
12local_lib_dir=${home_dir}/.local/lib
13font_dir=${home_dir}/.fonts
14
15
16mkdir -p ${code_dir}
17mkdir -p ${local_bin_dir}
18mkdir -p ${local_app_dir}
19mkdir -p ${local_icon_dir}
20mkdir -p ${local_lib_dir}
21mkdir -p ${temp_dir}
22mkdir -p ${font_dir}
23
24wget -nc -O ${temp_dir}/nerdfont.zip 'https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/FiraCode.zip'
25wget -nc -O ${temp_dir}/fatpack.deb 'http://archive.ubuntu.com/ubuntu/pool/universe/liba/libapp-fatpacker-perl/libapp-fatpacker-perl_0.010008-1_all.deb'
26
27sudo dpkg -i ${temp_dir}/fatpack.deb
28
29unzip -nq ${temp_dir}/nerdfont.zip -d ${font_dir}
30fc-cache -f -v
31
32git clone --depth=1 -b 0.50.0 https://github.com/junegunn/fzf.git ${code_dir}/fzf
33git clone --depth=1 -b v1.20.0 https://github.com/romkatv/powerlevel10k.git ${code_dir}/powerlevel10k
34git clone --depth=1 https://github.com/xuyuan/fri.git ${code_dir}/fri
35git clone --depth=1 -b v1.4.4 https://github.com/so-fancy/diff-so-fancy.git ${code_dir}/diff-so-fancy
36git clone --depth=1 -b v0.9.4 https://github.com/ajeetdsouza/zoxide.git ${code_dir}/zoxide
37git clone --depth=1 https://github.com/tmux-plugins/tpm ${home_dir}/.tmux/plugins/tpm
38git clone --depth=1 -b v1.18.2 https://github.com/starship/starship.git ${code_dir}/starship
39git clone --depth=1 -b add_colcon_support [email protected]:yschulz/rosshow.git ${code_dir}/rosshow/src/rosshow
40
41yes | . ${code_dir}/fzf/install
42. ${code_dir}/zoxide/install.sh
43sh ${code_dir}/starship/install/install.sh -y
44
45if [ -f "/opt/ros/"*"setup.bash" ]; then
46 cd ${code_dir}/rosshow
47 sudo /usr/bin/bash -c 'source /opt/ros/humble/setup.bash && colcon build --merge-install --install-base /opt/ros/bgl_humble'
48 cd ${home_dir}
49fi
50
51ln -s ${code_dir}/fri/fri ${local_bin_dir}/fri
52ln -s ${code_dir}/dotfiles/.dircolors ${home_dir}/.dircolors
53
54cd ${code_dir}/diff-so-fancy/third_party/build_fatpack
55perl build.pl --output ${local_bin_dir}/diff-so-fancy
56cd ${home_dir}
57
58rm -f ${home_dir}/.zshrc && ln -s ${code_dir}/dotfiles/.zshrc ${home_dir}/.zshrc
59rm -f ${home_dir}/.p10k.zsh && ln -s ${code_dir}/dotfiles/.p10k.zsh ${home_dir}/.p10k.zsh
60rm -f ${home_dir}/.tmux.conf && ln -s ${code_dir}/dotfiles/.tmux.conf ${home_dir}/.tmux.conf
61rm -rf ${home_dir}/.config/git && mkdir -p ${home_dir}/.config/git && ln -s ${code_dir}/dotfiles/.config/git/config ${home_dir}/.config/git/config
62
63sudo chsh ${USER} -s $(which zsh)
64
65sudo chown -R $USER /run/user
66
67dconf load /org/gnome/terminal/legacy/profiles:/ < ${code_dir}/dotfiles/gnome-terminal-profiles.dconf
68
69. ${home_dir}/.tmux/plugins/tpm/bin/install_plugins
70
71tmux source ${home_dir}/.tmux.conf