-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall_arch.sh
More file actions
122 lines (93 loc) · 3.93 KB
/
Copy pathinstall_arch.sh
File metadata and controls
122 lines (93 loc) · 3.93 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
if [ "$(whoami)" == "root" ]; then
echo "Run this script as your user account, not with sudo or as root"
exit
fi
# Fail on first error
set -e
# Upgrade packages
sudo pacman -Syu
# Add repo's bash config to system .bashrc if not already present
grep -qxF "source $HOME/dotfiles/config/bash/.bashrc" "$HOME"/.bashrc || echo "source $HOME/dotfiles/config/bash/.bashrc" >>"$HOME"/.bashrc
# Install Tmux Package Manager
rm -rf ./tpm "$HOME"/.tmux/plugins/tpm
git clone https://github.com/tmux-plugins/tpm "$HOME"/.tmux/plugins/tpm
# Use tmux.conf from this repo
echo "source-file $HOME/dotfiles/config/tmux/tmux.conf" >"$HOME"/.tmux.conf
# This is used for screenshots
mkdir -p "$HOME"/Pictures/screenshots
# Fonts
mkdir -p "$HOME"/.local/share/fonts
curl -fLO https://github.com/ryanoasis/nerd-fonts/raw/HEAD/patched-fonts/DroidSansMono/DroidSansMNerdFont-Regular.otf
mv DroidSansMNerdFont-Regular.otf "$HOME"/.local/share/fonts
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/JetBrainsMono.zip
sudo pacman -S unzip --noconfirm
unzip -o JetBrainsMono.zip -d "$HOME"/.local/share/fonts
rm JetBrainsMono.zip
sudo pacman -S breeze-icons --noconfirm # This is for krusader
# Packages required for next steps
sudo pacman -S i3-wm neovim tmux code kitty krusader feh polkit --noconfirm
# ZSH
sudo pacman -S zsh --noconfirm
rm -rf "$HOME"/.oh-my-zsh
yes no | sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
chsh -s /bin/zsh
# Symlink configs (NOTE: these overwrite previous files under $HOME and $HOME/.config)
# TODO: Use stow instead?
mkdir -p "$HOME"/.config
rm -rf "$HOME"/.config/i3 "$HOME"/.config/i3status
ln -sf "$HOME"/dotfiles/config/i3 "$HOME"/.config/
ln -sf "$HOME"/dotfiles/config/i3status "$HOME"/.config/
ln -sf "$HOME"/dotfiles/config/kitty "$HOME"/.config/
ln -sf "$HOME"/dotfiles/config/nvim "$HOME"/.config
ln -sf "$HOME"/dotfiles/config/zsh/.zshenv "$HOME"/.zshenv
ln -sf "$HOME"/dotfiles/config/zsh/.zshrc "$HOME"/.zshrc
ln -sf "$HOME"/dotfiles/config/zsh/.zprofile "$HOME"/.zprofile
ln -sf "$HOME"/dotfiles/config/conda/.condarc "$HOME"/.condarc
# Make local scripts and applications executable for the user
chmod u+x "$HOME"/dotfiles/scripts/tat
# Conda
mkdir -p "$HOME"/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O "$HOME"/miniconda3/miniconda.sh
bash "$HOME"/miniconda3/miniconda.sh -b -u -p "$HOME"/miniconda3
rm -rf "$HOME"/miniconda3/miniconda.sh
"$HOME"/miniconda3/bin/conda init zsh
# Sound
sudo pacman -S alsa-utils --noconfirm
amixer sset Master unmute
# Laptop screen brightness
sudo pacman -S brightnessctl --noconfirm
sudo usermod -aG video "$USER"
# Facilitate screen locking
sudo pacman -S xss-lock --noconfirm
# Facilitate suspend
sudo usermod -aG users "$USER"
sudo cp "$HOME"/dotfiles/scripts/suspend.rules /etc/polkit-1/rules.d
# Add Xorg configuration (mouse acceleration)
sudo cp "$HOME"/dotfiles/config/xorg/* /etc/X11/xorg.conf.d/
# Docker
sudo pacman -S docker docker-compose docker-buildx --noconfirm
# Flatpak for applications that force system updates too frequently
sudo pacman -S flatpak
# Node is also required for some neovim plugins
sudo pacman -S nodejs npm --noconfirm
# Set up global node packages
mkdir -p ~/.npm-global/lib
npm config set prefix "$HOME"/.npm-global
npm install -g @vue/typescript-plugin @vue/language-server ts-node typescript '@types/node' dclint
# uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Rust
sudo pacman -S rustup --noconfirm
# Go
sudo pacman -S go --noconfirm
# Media tools
sudo pacman -S gimp vlc ristretto --noconfirm
# Browsers
sudo pacman -S firefox chromium --noconfirm
# Messaging
sudo pacman -S telegram-desktop --noconfirm
flatpak install flathub com.discordapp.Discord
# VC
sudo pacman -S git tig --noconfirm
# Miscellaneous
sudo pacman -S extra/xorg-xrandr man-pages man-db network-manager-applet sshuttle maim xdotool ripgrep eza ncdu yazi imagemagick perf pavucontrol --noconfirm