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
|
#!/usr/bin/env bash
# raveos-hyprland-apply.sh
# ------------------------
# Telepíti a Hyprland téma payloadját:
# - /etc/skel alá (új usereknek)
# - minden meglévő, bejelentkező user home-jába
#
# Root jogosultság szükséges. A raveos-hyprland-theme-apply.service hívja
# egyszer, első boot után. Kézzel is futtatható újratelepítéshez.
set -euo pipefail
PAYLOAD="/usr/share/raveos/hyprland-theme/theme-data"
if [[ ! -d "$PAYLOAD" ]]; then
echo "Hiba: hiányzó payload: $PAYLOAD" >&2
exit 1
fi
if [[ ${EUID} -ne 0 ]]; then
echo "Root jogosultság szükséges." >&2
exit 1
fi
# ---------------------------------------------------------------------------
# SKEL TELEPÍTÉS
# Új usereknek (useradd által másolt /etc/skel tartalom)
# ---------------------------------------------------------------------------
# Hyprland Lua konfig (hyprland.lua + config/ könyvtár)
mkdir -p /etc/skel/.config/hypr
if [[ -d "${PAYLOAD}/hypr" ]]; then
cp -rf "${PAYLOAD}/hypr/." /etc/skel/.config/hypr/
# Ha Lua konfig létezik, a legacy .conf-ot töröljük
[[ -f /etc/skel/.config/hypr/hyprland.lua ]] && rm -f /etc/skel/.config/hypr/hyprland.conf
fi
# DankMaterialShell (DMS) felhasználói konfig
# A dms-shell-hyprland package a binárist és rendszerfájlokat telepíti,
# ez a blokk a per-user config könyvtárakat állítja be.
mkdir -p /etc/skel/.config/dms \
/etc/skel/.config/quickshell/pockets/DMS \
/etc/skel/.config/DankMaterialShell
DMS_SRC="${PAYLOAD}/dms"
if [[ -d "$DMS_SRC" ]]; then
cp -r "${DMS_SRC}/." /etc/skel/.config/quickshell/pockets/DMS/
cp -r "${DMS_SRC}/." /etc/skel/.config/dms/
if [[ -d "${DMS_SRC}/matugen/configs" ]]; then
mkdir -p /etc/skel/.config/matugen
cp -r "${DMS_SRC}/matugen/configs/." /etc/skel/.config/matugen/
fi
fi
[[ -f "${PAYLOAD}/DankMaterialShell/settings.json" ]] && \
install -Dm644 "${PAYLOAD}/DankMaterialShell/settings.json" \
/etc/skel/.config/DankMaterialShell/settings.json
[[ -f "${PAYLOAD}/DankMaterialShell/.firstlaunch" ]] && \
install -Dm644 "${PAYLOAD}/DankMaterialShell/.firstlaunch" \
/etc/skel/.config/DankMaterialShell/.firstlaunch
# Kitty terminál konfig
mkdir -p /etc/skel/.config/kitty
[[ -d "${PAYLOAD}/kitty" ]] && cp -r "${PAYLOAD}/kitty/." /etc/skel/.config/kitty/
# Fastfetch konfig
mkdir -p /etc/skel/.config/fastfetch
for f in config.jsonc config-kitty.jsonc raveos-logo.png raveos-logo.txt; do
[[ -f "${PAYLOAD}/fastfetch/${f}" ]] && \
install -Dm644 "${PAYLOAD}/fastfetch/${f}" "/etc/skel/.config/fastfetch/${f}"
done
# Fastfetch profile.d script (terminál nyitáskor fut)
[[ -f "${PAYLOAD}/profile.d/raveos-fastfetch.sh" ]] && \
install -Dm755 "${PAYLOAD}/profile.d/raveos-fastfetch.sh" /etc/profile.d/raveos-fastfetch.sh
# Skel root tartalom (pl. .bashrc, .icons, .themes stb.)
[[ -d "${PAYLOAD}/skel" ]] && \
cp -r --no-preserve=ownership "${PAYLOAD}/skel/." /etc/skel/
# Háttérkép
[[ -f "${PAYLOAD}/background.jpg" ]] && \
install -Dm644 "${PAYLOAD}/background.jpg" /etc/skel/.config/background.jpg
# Felhasználói avatar
[[ -f "${PAYLOAD}/hyprland-pp.png" ]] && \
install -Dm644 "${PAYLOAD}/hyprland-pp.png" /etc/skel/.face
# GTK, Thunar, nwg-look, xsettingsd, hyprshell konfigok
for d in gtk-3.0 gtk-4.0 nwg-look Thunar xfce4 xsettingsd hyprshell; do
if [[ -d "${PAYLOAD}/${d}" ]]; then
mkdir -p "/etc/skel/.config/${d}"
cp -rf "${PAYLOAD}/${d}/." "/etc/skel/.config/${d}/"
fi
done
# SDDM: a téma és konfig a PKGBUILD által van telepítve, itt nincs teendő
# ---------------------------------------------------------------------------
# MEGLÉVŐ USEREK FRISSÍTÉSE
# /etc/passwd alapján minden UID >= 1000 bejelentkező user home-ja
# ---------------------------------------------------------------------------
while IFS=: read -r user _ uid gid _ home shell; do
[[ "$uid" -ge 1000 ]] || continue
[[ -d "$home" ]] || continue
[[ "$shell" != "/usr/bin/nologin" && "$shell" != "/bin/false" ]] || continue
mkdir -p "${home}/.config/hypr" \
"${home}/.config/quickshell/pockets/DMS" \
"${home}/.config/dms" \
"${home}/.config/DankMaterialShell" \
"${home}/.config/matugen" \
"${home}/.config/kitty" \
"${home}/.config/fastfetch"
# Hyprland konfig
pkill -u "$user" hyprpaper 2>/dev/null || true
if [[ -d "${PAYLOAD}/hypr" ]]; then
cp -rf "${PAYLOAD}/hypr/." "${home}/.config/hypr/"
[[ -f "${home}/.config/hypr/hyprland.lua" ]] && \
rm -f "${home}/.config/hypr/hyprland.conf"
fi
# hyprpaper konfig (háttérkép daemon)
printf 'preload = %s/.config/background.jpg\nwallpaper = ,%s/.config/background.jpg\nsplash = false\n' \
"$home" "$home" > "${home}/.config/hypr/hyprpaper.conf"
# DMS per-user konfig
if [[ -d "$DMS_SRC" ]]; then
cp -r "${DMS_SRC}/." "${home}/.config/quickshell/pockets/DMS/"
cp -r "${DMS_SRC}/." "${home}/.config/dms/"
if [[ -d "${DMS_SRC}/matugen/configs" ]]; then
cp -r "${DMS_SRC}/matugen/configs/." "${home}/.config/matugen/"
fi
fi
[[ -f "${PAYLOAD}/DankMaterialShell/settings.json" ]] && \
install -Dm644 "${PAYLOAD}/DankMaterialShell/settings.json" \
"${home}/.config/DankMaterialShell/settings.json"
[[ -f "${PAYLOAD}/DankMaterialShell/.firstlaunch" ]] && \
install -Dm644 "${PAYLOAD}/DankMaterialShell/.firstlaunch" \
"${home}/.config/DankMaterialShell/.firstlaunch"
# Skel tartalom
[[ -d "${PAYLOAD}/skel" ]] && \
cp -r --no-preserve=ownership "${PAYLOAD}/skel/." "$home/"
# Háttérkép
[[ -f "${PAYLOAD}/background.jpg" ]] && \
install -Dm644 "${PAYLOAD}/background.jpg" "${home}/.config/background.jpg"
# Kitty
[[ -d "${PAYLOAD}/kitty" ]] && \
cp -r "${PAYLOAD}/kitty/." "${home}/.config/kitty/"
# Felhasználói avatar
[[ -f "${PAYLOAD}/hyprland-pp.png" ]] && \
install -Dm644 "${PAYLOAD}/hyprland-pp.png" "${home}/.face"
# Fastfetch
for f in config.jsonc config-kitty.jsonc raveos-logo.png raveos-logo.txt; do
[[ -f "${PAYLOAD}/fastfetch/${f}" ]] && \
install -Dm644 "${PAYLOAD}/fastfetch/${f}" "${home}/.config/fastfetch/${f}"
done
# GTK, Thunar, nwg-look, xsettingsd, hyprshell konfigok
for d in gtk-3.0 gtk-4.0 nwg-look Thunar xfce4 xsettingsd hyprshell; do
if [[ -d "${PAYLOAD}/${d}" ]]; then
mkdir -p "${home}/.config/${d}"
cp -rf "${PAYLOAD}/${d}/." "${home}/.config/${d}/"
fi
done
# Icon és GTK téma beállítása (dconf/gsettings)
# A settings.ini nem elég — a GTK daemonok a dconf-ot olvassák
# Chroot-ban (Calamares) dbus-launch lehet hogy nincs — ezért set +e
(
runuser -u "$user" -- dbus-launch gsettings set org.gnome.desktop.interface gtk-theme 'Yaru-olive-dark' 2>/dev/null
runuser -u "$user" -- dbus-launch gsettings set org.gnome.desktop.interface icon-theme 'Adwaitaru-olive' 2>/dev/null
) || true
# XDG user könyvtárak (Letöltések, Dokumentumok stb.)
runuser -u "$user" -- xdg-user-dirs-update 2>/dev/null || true
# Session init service engedélyezése (user service)
runuser -u "$user" -- systemctl --user enable raveos-hyprland-session-init.service 2>/dev/null || true
# Tulajdonos visszaállítása
chown -R "${uid}:${gid}" "$home"
# matugen: wallpaper-alapú színséma generálás
if command -v matugen &>/dev/null && [[ -f "${home}/.config/background.jpg" ]]; then
runuser -u "$user" -- matugen image "${home}/.config/background.jpg" 2>/dev/null || true
fi
# hyprpaper újraindítás, ha Hyprland fut
# Chroot-ban (Calamares telepítés) ez nem fut — nincs session
if [[ -d "/run/user/${uid}/hypr" ]]; then
xdg_run="/run/user/${uid}"
hypr_sig=$(ls "${xdg_run}/hypr/" 2>/dev/null | tail -1)
if [[ -n "$hypr_sig" ]]; then
runuser -u "$user" -- env \
XDG_RUNTIME_DIR="${xdg_run}" \
XDG_SESSION_TYPE=wayland \
XDG_CURRENT_DESKTOP=Hyprland \
HYPRLAND_INSTANCE_SIGNATURE="${hypr_sig}" \
WAYLAND_DISPLAY=wayland-1 \
LIBGL_ALWAYS_SOFTWARE=1 \
hyprpaper 2>/dev/null &
fi
fi
done < /etc/passwd
echo "Telepítés kész."
|