-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetting.sh
More file actions
109 lines (90 loc) · 2.7 KB
/
setting.sh
File metadata and controls
109 lines (90 loc) · 2.7 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
# 1. Update & Upgrade system
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade -y && sudo apt-get clean
# 2. Install packages
sudo apt-get install -y \
build-essential \
git \
wget \
curl \
wl-clipboard \
htop \
unzip \
nvtop \
tmux \
tzdata \
software-properties-common \
gnupg \
ca-certificates \
zip \
locales \
g++ \
zsh \
fontconfig \
stow \
fzf \
ripgrep \
fd-find \
lua5.1 \
luarocks \
# Install miniconda
curl -LO https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p $HOME/miniconda
source $HOME/miniconda/bin/activate
conda init
rm -rf Miniconda3-latest-Linux-x86_64.sh
# Install neovim
yes '' | sudo add-apt-repository ppa:neovim-ppa/unstable
sudo apt-get update && sudo apt-get install -y neovim
# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
cat <<'EOF' >>~/.bashrc
# nvm initialization
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
EOF
# Install rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source ~/.cargo/env
rustup update
# Install yazi
cargo install --locked yazi-fm yazi-cli
# Install lsd
cargo install lsd
source ~/.bashrc
# load nvm manually
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# Install node
nvm install --lts
# Install font
FONT_TMP=~/fonts_download
mkdir -p "$FONT_TMP"
cd "$FONT_TMP"
wget -q https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/Tinos.zip
unzip -o Tinos.zip
cd ..
mkdir -p ~/.fonts
cp "$FONT_TMP"/*.ttf ~/.fonts/
fc-cache -fv
rm -rf "$FONT_TMP"
# Install lazygit
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | \grep -Po '"tag_name": *"v\K[^"]*')
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
tar xf lazygit.tar.gz lazygit
sudo install lazygit -D -t /usr/local/bin/
rm -rf lazygit.tar.gz lazygit
# Install starship
curl -sS https://starship.rs/install.sh | sh -s -- -y
git clone https://github.com/yaocongchen/dotfiles.git
cd dotfiles
stow zsh starship nvim tmux yazi
cd
# Set Zsh as the default login shell
if command -v zsh >/dev/null 2>&1; then
sudo chsh -s "$(which zsh)" || echo "Please manually switch the default shell to zsh"
fi
conda init zsh
# no show (env name because starship already processed)
conda config --set changeps1 false
exec zsh