-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sh
More file actions
executable file
·124 lines (92 loc) · 2.68 KB
/
init.sh
File metadata and controls
executable file
·124 lines (92 loc) · 2.68 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
#!/usr/bin/env bash
set -euo pipefail
GREEN="\e[32m"
YELLOW="\e[33m"
RESET="\e[0m"
log() { echo -e "${GREEN}==>${RESET} $1"; }
warn() { echo -e "${YELLOW}==>${RESET} $1"; }
log "Installing reflector and updating mirrors..."
sudo pacman -S --needed --noconfirm reflector
sudo reflector --latest 20 --protocol https --sort rate --save /etc/pacman.d/mirrorlist
log "Updating package databases..."
sudo pacman -Syu --noconfirm
log "Installing base packages..."
packages=(
# essentials
git stow base-devel
# shell
zsh starship
# editor + cli tools
neovim ripgrep fd fzf bat eza yazi
# yazi previews (video / image / pdf)
ffmpegthumbnailer ueberzugpp poppler
# hyprland
hyprland hyprsunset hyprlock uwsm
xdg-desktop-portal-hyprland hyprpolkitagent
qt5-wayland qt6-wayland
# desktop widgets
waybar swaync rofi-wayland swww
# terminal
ghostty
# screenshot
grim slurp swappy wl-clipboard
# login manager
greetd greetd-tuigreet
# hardware
mesa bluez bluez-utils
# services
openssh docker docker-compose
# monitoring
btop
# runtimes
go nvm
# utilities
unzip bind-tools
# credentials
gnome-keyring libsecret
# gtk + image viewer
nwg-look imv
# misc
tealdeer ruff spotify-launcher
#font
otf-geist-mono-nerd
)
sudo pacman -S --needed --noconfirm "${packages[@]}"
log "Setting up directories..."
mkdir -p "$HOME/repo/zen" "$HOME/lib" "$HOME/tmp"
log "Cloning public repos..."
pushd "$HOME/repo/zen" > /dev/null
[ ! -d "dots" ] && git clone https://github.com/samintejas/dots.git
[ ! -d "wallpapers" ] && git clone https://github.com/samintejas/wallpapers.git
[ ! -d "scripts" ] && git clone https://github.com/samintejas/scripts.git
popd > /dev/null
log "Configuring dotfiles with stow..."
pushd "$HOME/repo/zen/dots" > /dev/null
stow -t "$HOME" home || warn "stow failed"
popd > /dev/null
log "Changing shell to zsh..."
chsh -s /bin/zsh "$USER"
log "Copying scripts..."
for script in powerctl sshot sshot-shift; do
sudo cp "$HOME/repo/zen/scripts/$script" /usr/bin/
done
if ! command -v paru &>/dev/null; then
log "Installing paru..."
pushd "$HOME/tmp" > /dev/null
git clone https://aur.archlinux.org/paru.git
pushd paru > /dev/null
makepkg -si --noconfirm
popd > /dev/null
popd > /dev/null
else
log "paru already installed."
fi
log "Installing AUR packages..."
paru -S --needed --noconfirm zen-browser
log "Enabling services..."
sudo systemctl enable greetd.service
sudo systemctl enable docker.service
log "Installing go tools..."
go install mvdan.cc/gofumpt@latest
go install golang.org/x/tools/cmd/goimports@latest
log "Done!"