-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharch-kde.sh
More file actions
201 lines (156 loc) · 4.35 KB
/
arch-kde.sh
File metadata and controls
201 lines (156 loc) · 4.35 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
#!/usr/bin/env bash
# =============================================================================
# Script: arch-kde.sh
# Purpose: Bootstrap a clean Arch system + install an operator-focused KDE Plasma
# Model: Frontend workstation (SSH, Emacs, terminals) — backend is headless
# Safe to re-run. No disk or bootloader changes.
# =============================================================================
set -euo pipefail
say() { printf "\n\033[1m▶ %s\033[0m\n" "$*"; }
ok() { printf " ✓ %s\n" "$*"; }
warn() { printf "\033[33m ! %s\033[0m\n" "$*"; }
die() { printf "\033[31m ✗ %s\033[0m\n" "$*"; exit 1; }
# ---- Preflight ---------------------------------------------------------------
if ! command -v sudo >/dev/null 2>&1; then
if [[ $EUID -ne 0 ]]; then
die "This script requires sudo or root."
fi
SUDO=""
else
SUDO="sudo"
fi
# ---- 1) Pacman sanity --------------------------------------------------------
say "Refreshing system and ensuring pacman sanity…"
$SUDO pacman -Syu --noconfirm || true
# Keyring (fresh installs)
if ! $SUDO pacman-key --list-keys >/dev/null 2>&1; then
say "Initializing pacman keyring…"
$SUDO pacman-key --init
$SUDO pacman-key --populate archlinux
fi
# Mirrors (if needed)
$SUDO pacman -S --needed --noconfirm reflector
$SUDO reflector --latest 10 --protocol https --sort rate \
--save /etc/pacman.d/mirrorlist
$SUDO pacman -Syu --noconfirm
ok "Pacman ready."
# ---- 2) Base system services -------------------------------------------------
say "Installing base system services…"
BASE_PKGS=(
sudo
networkmanager
openssh
git
)
$SUDO pacman -S --needed --noconfirm "${BASE_PKGS[@]}"
$SUDO systemctl enable --now NetworkManager
ok "Base services installed."
# ---- 3) Core CLI / operator tools -------------------------------------------
say "Installing core CLI + operator tools…"
CORE_PKGS=(
tmux
wezterm
emacs
neovim
yazi
lazygit
fish
btop
ripgrep
fd
bat
fzf
jq
cmake
ffmpegthumbnailer
poppler
imagemagick
mediainfo
p7zip
tar
ipython
glow
git-delta
links
w3m
obs-studio
vlc
qbittorrent
)
$SUDO pacman -S --needed --noconfirm "${CORE_PKGS[@]}"
ok "Core tools installed."
# ---- 4) Audio stack (PipeWire) -----------------------------------------------
say "Installing PipeWire audio stack…"
AUDIO_PKGS=(
pipewire
pipewire-alsa
pipewire-pulse
wireplumber
pavucontrol
)
$SUDO pacman -S --needed --noconfirm "${AUDIO_PKGS[@]}"
ok "Audio stack ready."
# ---- 5) Bluetooth (system-level only) ---------------------------------------
say "Installing Bluetooth stack…"
BT_PKGS=(
bluez
bluez-utils
)
$SUDO pacman -S --needed --noconfirm "${BT_PKGS[@]}"
$SUDO systemctl enable --now bluetooth || true
$SUDO rfkill unblock bluetooth || true
ok "Bluetooth base configured."
# ---- 6) KDE Plasma (tailored, minimal) --------------------------------------
say "Installing KDE Plasma (operator-focused)…"
KDE_PKGS=(
plasma-desktop
plasma-wayland-session
kde-system-meta
kde-utilities-meta
xdg-desktop-portal
xdg-desktop-portal-kde
bluedevil
powerdevil
kdeconnect
dolphin
konsole
ark
kcalc
)
$SUDO pacman -S --needed --noconfirm "${KDE_PKGS[@]}"
ok "KDE Plasma installed."
# ---- 7) Fonts ----------------------------------------------------------------
say "Installing fonts…"
FONT_PKGS=(
ttf-jetbrains-mono-nerd
noto-fonts
noto-fonts-emoji
)
$SUDO pacman -S --needed --noconfirm "${FONT_PKGS[@]}"
ok "Fonts installed."
# ---- 8) Browsers -------------------------------------------------------------
say "Installing browsers…"
BROWSER_PKGS=(
firefox
falkon
)
$SUDO pacman -S --needed --noconfirm "${BROWSER_PKGS[@]}"
ok "Browsers installed."
# ---- 9) Doom Emacs (optional, non-destructive) -------------------------------
say "Installing Doom Emacs (optional)…"
if [[ ! -d "$HOME/.emacs.d/.git" ]]; then
git clone --depth 1 https://github.com/doomemacs/doomemacs "$HOME/.emacs.d"
"$HOME/.emacs.d/bin/doom" install --no-config --no-env
ok "Doom Emacs installed."
else
ok "Doom Emacs already present; skipping."
fi
# ---- Final -------------------------------------------------------------------
say "Bootstrap complete."
echo
echo "Next steps:"
echo " 1) Reboot"
echo " 2) Select: Plasma (Wayland)"
echo " 3) Configure KWin shortcuts, window rules, and workspaces"
echo
ok "System ready for daily use."