-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall-arch-packages.sh
More file actions
107 lines (85 loc) · 3.99 KB
/
Copy pathinstall-arch-packages.sh
File metadata and controls
107 lines (85 loc) · 3.99 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
#!/usr/bin/env bash
set -euo pipefail
# ---------------------------------------------------------------------------
# Arch Linux base setup for a sway / Wayland desktop environment.
# NOTE: Only comments have been translated / aligned for public release.
# All executable lines, package lists, and user-facing echo messages
# remain unchanged intentionally.
# ---------------------------------------------------------------------------
have() { command -v "$1" &>/dev/null; }
echo "==> System update…"
sudo pacman -Syu --noconfirm
# ---------------------------------------------------------------------------
# Repository packages (pacman)
# ---------------------------------------------------------------------------
REPO_PKGS=(
# Window manager / bar / launcher / lock
sway swaylock swayidle waybar wofi wlogout
# Terminal & screenshots
kitty grim slurp swappy wl-clipboard cliphist
# Network UI & autostart helpers
network-manager-applet dex
# Automount / USB / filesystems
udiskie udisks2 gvfs gvfs-mtp gvfs-gphoto2 ntfs-3g exfatprogs
# Audio (PipeWire stack) + mixer
pipewire pipewire-pulse pipewire-alsa wireplumber pavucontrol
# Tools / utilities
brightnessctl jq unzip ripgrep fd fzf ranger git stow gnupg pass tree
# Polkit agent & PolicyKit
polkit lxqt-policykit
# Libcanberra sound themes + GSettings schemas
libcanberra libcanberra-pulse gsettings-desktop-schemas dconf
# Viewers
imv mpv zathura
# Fonts (repository variants; it's fine if they exist for you)
noto-fonts noto-fonts-emoji ttf-jetbrains-mono-nerd ttf-nerd-fonts-symbols
# Power profiles (battery modes)
power-profiles-daemon
)
echo "==> Installing repository packages…"
sudo pacman -S --needed --noconfirm "${REPO_PKGS[@]}"
# ---------------------------------------------------------------------------
# AUR packages (optional if available)
# ---------------------------------------------------------------------------
AUR_PKGS=(
# Wayland wallpaper setter
waypaper
# If fonts are only offered via AUR for your mirror, use these names:
# nerd-fonts-jetbrains-mono nerd-fonts-symbols
)
if have yay; then
echo "==> Found yay – installing AUR packages…"
yay -S --needed --noconfirm "${AUR_PKGS[@]}" || true
else
echo "==> Note: 'yay' not found – skipping AUR packages:"
printf ' - %s\n' "${AUR_PKGS[@]}"
echo " Install yay (or paru) and rerun this script if you want the AUR packages."
fi
# ---------------------------------------------------------------------------
# Enable services (best effort)
# ---------------------------------------------------------------------------
echo "==> Enabling user services (where available)…"
systemctl --user enable --now pipewire.socket pipewire-pulse.socket wireplumber.service || true
systemctl --user enable --now udiskie.service || true
systemctl --user enable --now cliphist.service || true
echo "==> Enabling system service power-profiles-daemon…"
sudo systemctl enable --now power-profiles-daemon.service || true
# ---------------------------------------------------------------------------
# Libcanberra GTK module (sound events)
# ---------------------------------------------------------------------------
echo "==> Setting GTK_MODULES=canberra-gtk-module (via environment.d)…"
mkdir -p ~/.config/environment.d
printf 'GTK_MODULES=canberra-gtk-module\n' > ~/.config/environment.d/50-canberra.conf
# ---------------------------------------------------------------------------
# Finish
# ---------------------------------------------------------------------------
echo
echo "Done! Restart your session once (or run 'systemctl --user daemon-reload')"
echo "so that environment variables & user services load cleanly."
echo
echo "Tips:"
echo "- Sway config should start polkit agent & nm-applet:"
echo " exec --no-startup-id /usr/bin/lxqt-policykit-agent"
echo " exec --no-startup-id nm-applet"
echo "- Screenshot region: Print -> grim + slurp + swappy (already installed)."
echo "- Sound events test: canberra-gtk-play -i dialog-information"