-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstaller.sh
More file actions
executable file
·339 lines (300 loc) · 6.72 KB
/
installer.sh
File metadata and controls
executable file
·339 lines (300 loc) · 6.72 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
#!/usr/bin/env bash
# ==========================================
# Kenso Installer (FINAL CLEAN VERSION)
# ==========================================
set -euo pipefail
# -----------------------------
# Paths
# -----------------------------
BASE_DIR="$HOME/hyprkenso"
CONFIG_DIR="$HOME/.config"
BACKUP_DIR="$HOME/.config_backup_$(date +%Y%m%d%H%M)"
# -----------------------------
# Required packages (minimal)
# -----------------------------
PACKAGES=(
tar
7zip
unzip
ripgrep
fd
nodejs
luarocks
base-devel
hererocks
lua
satty
tree-sitter-cli
lazygit
npm
rsync
file-roller
downgrade
sddm
qt5-3d
qt5-base
qt5-declarative
qt5-gamepad
qt5-graphicaleffects
qt5-imageformats
qt5-location
qt5-multimedia
qt5-networkauth
qt5-quickcontrols
qt5-quickcontrols2
qt5-script
qt5-sensors
qt5-serialport
qt5-speech
qt5-svg
qt5-tools
qt5-translations
qt5-virtualkeyboard
qt5-wayland
qt5-x11extras
qt5-xmlpatterns
qt5ct-kde
qt6-5compat
qt6-base
qt6-declarative
qt6-imageformats
qt6-multimedia
qt6-multimedia-ffmpeg
qt6-networkauth
qt6-positioning
qt6-scxml
qt6-shadertools
qt6-speech
qt6-svg
qt6-tools
qt6-translations
qt6-virtualkeyboard
qt6-wayland
qt6-webchannel
qt6-webengine
qt6ct-kde
gtk-doc
gtk-layer-shell
gtk-update-icon-cache
gtk-vnc
gtk3
gtk4
gtk4-layer-shell
hyprland
waybar
rofi
rofi-emoji
btop
neovim
swaync
python
matugen
wlogout
swww
swayosd
polkit-gnome
wl-clipboard
wl-clip-persist
swappy
tmux
thunar
brave-bin
zsh
zsh-autosuggestions
zsh-history-substring-search
zsh-syntax-highlighting
cava
kitty
yazi
fastfetch
rmpc-git
quickshell-git
mpd
mpd-mpris
playerctl
brightnessctl
visual-studio-code-insiders-bin
nwg-look
nwg-displays
loupe
feh
mpv
mpc
papirus-folders
pipewire
pipewire-alsa
pipewire-pulse
pipewire-audio
nm-connection-editor
networkmanager
man-db
reflector
jack2
otf-font-awesome
otf-space-grotesk
ttf-jetbrains-mono-nerd
ttf-material-symbols-variable-git
ttf-readex-pro
ttf-rubik-vf
ttf-twemoji
starship
fontconfig
adw-gtk-theme-git
hyprlock
hypridle
grim
slurp
jq
libnotify
imagemagick
tesseract
tesseract-data-eng
wf-recorder
hyprpicker
opencv
python-opencv
colloid-icon-theme-git
noto-fonts-cjk
zsh-theme-powerlevel10k-git
fzf
fzf-tab-git
eza
bat
)
# -----------------------------
# Repos
# -----------------------------
DOTS_REPO="https://github.com/aadritobasu/kenso-dots"
ICONS_REPO="https://github.com/aadritobasu/kenso-icon-themes"
FASTFETCH_REPO="https://github.com/aadritobasu/kenso-fastfetch-config"
WALLS_REPO="https://github.com/aadritobasu/wallpapers"
# -----------------------------
# Ensure yay exists
# -----------------------------
if ! command -v yay &>/dev/null; then
echo "❌ yay not found. Install yay first."
exit 1
fi
# -----------------------------
# Install packages
# -----------------------------
echo "📦 Installing packages..."
yay -Syu --noconfirm
yay -S --needed --noconfirm "${PACKAGES[@]}"
# -----------------------------
# Clone repos
# -----------------------------
echo "📥 Cloning repositories..."
mkdir -p "$BASE_DIR"
clone_or_update() {
local repo="$1"
local dest="$2"
if [[ -d "$dest/.git" ]]; then
git -C "$dest" pull
else
git clone "$repo" "$dest"
fi
}
clone_or_update "$DOTS_REPO" "$BASE_DIR/kenso-dots"
clone_or_update "$ICONS_REPO" "$BASE_DIR/kenso-icon-themes"
clone_or_update "$FASTFETCH_REPO" "$BASE_DIR/kenso-fastfetch"
clone_or_update "$WALLS_REPO" "$BASE_DIR/wallpapers"
# -----------------------------
# Backup ~/.config ONCE
# -----------------------------
echo "🗄 Backing up ~/.config → $BACKUP_DIR"
if [[ -d "$CONFIG_DIR" ]]; then
cp -a "$CONFIG_DIR" "$BACKUP_DIR"
fi
# -----------------------------
# Copy dotfiles → ~/.config (NO .git)
# -----------------------------
echo "📂 Copying kenso-dots into ~/.config"
rsync -a \
--exclude='.git' \
--exclude='.gitignore' \
"$BASE_DIR/kenso-dots"/ \
"$CONFIG_DIR"/
# -----------------------------
# Wallpapers
# -----------------------------
echo "🖼 Installing wallpapers..."
mkdir -p "$HOME/Pictures"
rsync -a "$BASE_DIR/wallpapers"/ "$HOME/Pictures/wallpapers/"
# -----------------------------
# Icon themes
# -----------------------------
echo "🎨 Installing icon themes..."
mkdir -p "$HOME/.local/share/icons"
rsync -a "$BASE_DIR/kenso-icon-themes"/ "$HOME/.local/share/icons/"
# -----------------------------
# Fastfetch
# -----------------------------
echo "⚡ Installing fastfetch config..."
cd "$BASE_DIR/kenso-fastfetch"
chmod +x install.sh
./install.sh
cd "$HOME"
# -----------------------------
# ZSH config copy
# -----------------------------
echo "🐚 Copying ZSH configs..."
ZSH_SRC="$CONFIG_DIR/zsh"
if [[ -d "$ZSH_SRC" ]]; then
rsync -a "$ZSH_SRC"/ "$HOME/"
fi
# -----------------------------
# Change default shell
# -----------------------------
if [[ "$(getent passwd "$USER" | cut -d: -f7)" != "$(which zsh)" ]]; then
chsh -s "$(which zsh)"
fi
# -----------------------------
# Enable services
# -----------------------------
echo "🎵 Enabling services..."
sudo systemctl enable --now mpd
systemctl --user enable --now pipewire pipewire-pulse
# -----------------------------
# Fix hypr-lens paths
# -----------------------------
echo "🛠 Fixing hypr-lens paths..."
CFG="$CONFIG_DIR/hypr-lens/config.json"
if [[ -f "$CFG" ]]; then
tmp="$(mktemp)"
jq --arg home "$HOME" '
.appearance.matugenPath = ($home + "/.config/quickshell/matugen.json")
| .screenSnip.savePath = ($home + "/Pictures/ScreenShots")
' "$CFG" > "$tmp"
mv "$tmp" "$CFG"
fi
QS_MUSIC="$HOME/.config/quickshell/music/MusicPanel.qml"
if [[ -f "$QS_MUSIC" ]]; then
echo "Fixing matugen path in MusicPanel.qml..."
sed -i "s|/home/[^/]*/.config/quickshell/matugen.json|$HOME/.config/quickshell/matugen.json|g" "$QS_MUSIC"
echo "✔ Path updated"
else
echo "⚠ MusicPanel.qml not found, skipping..."
fi
# -----------------------------
# Display manager
# -----------------------------
if ! pacman -Q gdm &>/dev/null && ! pacman -Q lightdm &>/dev/null; then
sudo systemctl enable sddm
fi
# ==========================================
# 🚀 Run post-install script
# ==========================================
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
POST_INSTALL="$SCRIPT_DIR/post-install.sh"
if [[ -f "$POST_INSTALL" ]]; then
echo "🔧 Running post-install script..."
chmod +x "$POST_INSTALL"
"$POST_INSTALL"
echo "✔ Post-install completed"
else
echo "⚠ post-install.sh not found, skipping"
fi
echo "✅ Kenso installation COMPLETE"
echo "🔁 Backup: $BACKUP_DIR"
echo "➡️ Reboot recommended"