diff options
| author | Nippy <nippy@Beller-Mac-mini.lan> | 2026-09-07 19:48:54 +0200 |
|---|---|---|
| committer | Nippy <nippy@Beller-Mac-mini.lan> | 2026-09-07 19:48:54 +0200 |
| commit | ed1c9a34738f8c60467a96a5c938ec757f65861a (patch) | |
| tree | 41b69ebc23364d0673f9299dc5cad96663b0ec44 | |
| parent | e5636385e253a52688a59f8c2a45cd673c04b102 (diff) | |
| download | RaveOS-PKGBUILD-ed1c9a34738f8c60467a96a5c938ec757f65861a.tar.gz RaveOS-PKGBUILD-ed1c9a34738f8c60467a96a5c938ec757f65861a.zip | |
rework theme
| -rw-r--r-- | raveos-plasma-theme/.SRCINFO | 17 | ||||
| -rw-r--r-- | raveos-plasma-theme/PKGBUILD | 68 | ||||
| -rw-r--r-- | raveos-plasma-theme/kdeglobals | 8 | ||||
| -rw-r--r-- | raveos-plasma-theme/konsolerc | 8 | ||||
| -rw-r--r-- | raveos-plasma-theme/kscreenlockerrc | 3 | ||||
| -rw-r--r-- | raveos-plasma-theme/ksplashrc | 3 | ||||
| -rwxr-xr-x[-rw-r--r--] | raveos-plasma-theme/raveos-plasma-apply.sh | 385 | ||||
| -rwxr-xr-x[-rw-r--r--] | raveos-plasma-theme/raveos-plasma-first-login.sh | 82 | ||||
| -rw-r--r-- | raveos-plasma-theme/raveos-plasma-theme-apply.service | 1 | ||||
| -rw-r--r-- | raveos-plasma-theme/raveos-plasma-theme.install | 2 |
10 files changed, 184 insertions, 393 deletions
diff --git a/raveos-plasma-theme/.SRCINFO b/raveos-plasma-theme/.SRCINFO index fe775be..099fb91 100644 --- a/raveos-plasma-theme/.SRCINFO +++ b/raveos-plasma-theme/.SRCINFO @@ -1,11 +1,16 @@ -pkgbase = raveos-kde-theme - pkgdesc = RaveOS KDE theme payload and installer - pkgver = 0.0.0 - pkgrel = 21 +pkgbase = raveos-plasma-theme + pkgdesc = RaveOS Plasma theme payload and installer + pkgver = 1.0.0 + pkgrel = 1 url = https://raveos.local - install = raveos-kde-theme.install + install = raveos-plasma-theme.install arch = any license = custom + conflicts = raveos-gnome-theme + conflicts = raveos-hyprland-theme + conflicts = raveos-cosmic-theme depends = fastfetch + depends = raveos-sddm-theme + options = !debug -pkgname = raveos-kde-theme +pkgname = raveos-plasma-theme diff --git a/raveos-plasma-theme/PKGBUILD b/raveos-plasma-theme/PKGBUILD index 9e9a274..c887b80 100644 --- a/raveos-plasma-theme/PKGBUILD +++ b/raveos-plasma-theme/PKGBUILD @@ -1,25 +1,14 @@ # Maintainer: nippy <nippy@tuta.io> -# -# raveos-plasma-theme -# ------------------- -# KDE Plasma DE téma csomag: kitty, fastfetch, Plasma splash, Konsole profil, -# kickoff ikon, háttérkép. -# -# Az apply script (raveos-plasma-theme-apply.service) post_install hook-ból -# fut és bemásolja a theme-data tartalmát /etc/skel-be és minden meglévő -# user home-jába. -# -# Az SDDM login téma külön csomagban van (raveos-sddm-theme), mert korábban -# mind a négy DE-téma csomag (cosmic/gnome/hyprland/plasma) ugyanazt a -# byte-azonos SDDM temat csomagolta duplán. pkgname=raveos-plasma-theme -pkgver=0.0.0 -pkgrel=37 +pkgver=1.0.0 +pkgrel=1 pkgdesc="RaveOS Plasma theme payload and installer" arch=('any') url="https://raveos.local" license=('custom') +options=('!debug') +conflicts=('raveos-gnome-theme' 'raveos-hyprland-theme' 'raveos-cosmic-theme') depends=('fastfetch' 'raveos-sddm-theme') @@ -27,7 +16,6 @@ install="${pkgname}.install" source=() sha256sums=() -# Build könyvtárak az src mellé, ne a makepkg alapértelmezettbe BUILDDIR="${startdir}/build" PKGDEST="${startdir}/build" SRCDEST="${startdir}/build" @@ -35,34 +23,46 @@ SRCPKGDEST="${startdir}/build" LOGDEST="${startdir}/build" package() { - # theme-data payload: kitty, fastfetch, Plasma konfig, Konsole, splash stb. + install -dm755 "${pkgdir}/usr/share/backgrounds/raveos" + install -Dm644 "${startdir}/theme-data/background" \ + "${pkgdir}/usr/share/backgrounds/raveos/raveos-main-bg.jpeg" + + install -dm755 "${pkgdir}/usr/share/plasma/look-and-feel/org.kde.raveos.desktop" + cp -r --no-preserve=ownership "${startdir}/theme-data/plasma-splash/." \ + "${pkgdir}/usr/share/plasma/look-and-feel/org.kde.raveos.desktop/" + + install -Dm644 "${startdir}/theme-data/system/raveos-logo.svg" \ + "${pkgdir}/usr/share/pixmaps/raveos-logo.svg" + install -Dm644 "${startdir}/theme-data/system/raveos-logo.svg" \ + "${pkgdir}/usr/share/icons/hicolor/scalable/apps/raveos-logo.svg" + install -Dm644 "${startdir}/theme-data/plasma/org.kde.plasma.kickoff.svg" \ + "${pkgdir}/usr/share/icons/hicolor/scalable/apps/distributor-logo-raveos.svg" + + install -dm755 "${pkgdir}/usr/share/konsole" + install -Dm644 "${startdir}/theme-data/konsole/RaveOS.colorscheme" \ + "${pkgdir}/usr/share/konsole/RaveOS.colorscheme" + install -Dm644 "${startdir}/theme-data/konsole/RaveOS.profile" \ + "${pkgdir}/usr/share/konsole/RaveOS.profile" + + install -dm755 "${pkgdir}/etc/xdg" + install -Dm644 "${startdir}/kdeglobals" "${pkgdir}/etc/xdg/kdeglobals" + install -Dm644 "${startdir}/ksplashrc" "${pkgdir}/etc/xdg/ksplashrc" + install -Dm644 "${startdir}/kscreenlockerrc" "${pkgdir}/etc/xdg/kscreenlockerrc" + install -Dm644 "${startdir}/konsolerc" "${pkgdir}/etc/xdg/konsolerc" + + install -Dm755 "${startdir}/theme-data/profile.d/raveos-fastfetch.sh" \ + "${pkgdir}/etc/profile.d/raveos-fastfetch.sh" + install -dm755 "${pkgdir}/usr/share/raveos/plasma-theme" cp -r --no-preserve=ownership "${startdir}/theme-data" \ "${pkgdir}/usr/share/raveos/plasma-theme/" - # SDDM téma: külön csomagban (raveos-sddm-theme), lásd depends - - # apply script: post_install hook hívja install -Dm755 "${startdir}/raveos-plasma-apply.sh" \ "${pkgdir}/usr/lib/raveos-plasma-theme/auto-apply.sh" - - # first-login script: első bejelentkezéskor fut (XDG autostart) install -Dm755 "${startdir}/raveos-plasma-first-login.sh" \ "${pkgdir}/usr/lib/raveos-plasma-theme/first-login.sh" - - # systemd service (a post_install hook enable-oli) install -Dm644 "${startdir}/raveos-plasma-theme-apply.service" \ "${pkgdir}/usr/lib/systemd/system/raveos-plasma-theme-apply.service" - - # XDG autostart: first-login script indítása install -Dm644 "${startdir}/raveos-plasma-first-login.desktop" \ "${pkgdir}/etc/xdg/autostart/raveos-plasma-first-login.desktop" - - # Kickoff/rendszer ikon - globálisan is telepítve, nem csak user-szinten - install -Dm644 "${startdir}/theme-data/plasma/org.kde.plasma.kickoff.svg" \ - "${pkgdir}/usr/share/pixmaps/raveos-logo.svg" - install -Dm644 "${startdir}/theme-data/plasma/org.kde.plasma.kickoff.svg" \ - "${pkgdir}/usr/share/icons/hicolor/scalable/apps/raveos-logo.svg" - install -Dm644 "${startdir}/theme-data/plasma/org.kde.plasma.kickoff.svg" \ - "${pkgdir}/usr/share/icons/hicolor/scalable/apps/distributor-logo-raveos.svg" } diff --git a/raveos-plasma-theme/kdeglobals b/raveos-plasma-theme/kdeglobals new file mode 100644 index 0000000..5bdede9 --- /dev/null +++ b/raveos-plasma-theme/kdeglobals @@ -0,0 +1,8 @@ +[General] +ColorScheme=BreezeDark + +[Icons] +Theme=breeze-dark + +[KDE] +widgetStyle=Breeze diff --git a/raveos-plasma-theme/konsolerc b/raveos-plasma-theme/konsolerc new file mode 100644 index 0000000..19c0700 --- /dev/null +++ b/raveos-plasma-theme/konsolerc @@ -0,0 +1,8 @@ +[Desktop Entry] +DefaultProfile=RaveOS.profile + +[General] +ConfigVersion=1 + +[UiSettings] +ColorScheme=RaveOS diff --git a/raveos-plasma-theme/kscreenlockerrc b/raveos-plasma-theme/kscreenlockerrc new file mode 100644 index 0000000..3a51502 --- /dev/null +++ b/raveos-plasma-theme/kscreenlockerrc @@ -0,0 +1,3 @@ +[Greeter][Wallpaper][org.kde.image][General] +FillMode=2 +Image=file:///usr/share/backgrounds/raveos/raveos-main-bg.jpeg diff --git a/raveos-plasma-theme/ksplashrc b/raveos-plasma-theme/ksplashrc new file mode 100644 index 0000000..f39b790 --- /dev/null +++ b/raveos-plasma-theme/ksplashrc @@ -0,0 +1,3 @@ +[KSplash] +Engine=KSplashQML +Theme=org.kde.raveos.desktop diff --git a/raveos-plasma-theme/raveos-plasma-apply.sh b/raveos-plasma-theme/raveos-plasma-apply.sh index 7b88c99..2e7854e 100644..100755 --- a/raveos-plasma-theme/raveos-plasma-apply.sh +++ b/raveos-plasma-theme/raveos-plasma-apply.sh @@ -1,12 +1,4 @@ #!/usr/bin/env bash -# raveos-plasma-apply.sh -# ---------------------- -# Telepíti a KDE Plasma 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-plasma-theme.install post_install -# hook-ja hívja közvetlenül. set -euo pipefail @@ -23,10 +15,6 @@ if [[ ${EUID} -ne 0 ]]; then exit 1 fi -# --------------------------------------------------------------------------- -# SEGÉDFÜGGVÉNYEK -# --------------------------------------------------------------------------- - ensure_bashrc_hook() { local bashrc_path="$1" local hook_line='[[ -f /etc/profile.d/raveos-fastfetch.sh ]] && source /etc/profile.d/raveos-fastfetch.sh' @@ -39,15 +27,15 @@ ensure_bashrc_hook() { disable_kmix_autostart() { local target_home="$1" mkdir -p "${target_home}/.config/autostart" - cat > "${target_home}/.config/autostart/kmix_autostart.desktop" <<'EOF' + cat > "${target_home}/.config/autostart/kmix_autostart.desktop" <<'KMEOF' [Desktop Entry] Hidden=true -EOF +KMEOF } write_konsolerc() { local target_home="$1" - cat > "${target_home}/.config/konsolerc" <<'EOF' + cat > "${target_home}/.config/konsolerc" <<'KSEOF' [Desktop Entry] DefaultProfile=RaveOS.profile @@ -56,340 +44,127 @@ ConfigVersion=1 [UiSettings] ColorScheme=RaveOS -EOF -} - -write_kxkbrc() { - local target_home="$1" - local kb_layout="hu" - local kb_tmp - if [[ -f /etc/default/keyboard ]]; then - kb_tmp="$(awk -F'"' '/^XKBLAYOUT=/{print $2; exit}' /etc/default/keyboard 2>/dev/null)" - [[ -n "$kb_tmp" ]] && kb_layout="${kb_tmp%%,*}" - fi - cat > "${target_home}/.config/kxkbrc" <<EOF -[Layout] -LayoutList=${kb_layout} -EOF -} - -write_plasma_wallpaper_config() { - local target_home="$1" - local applet_config="${target_home}/.config/plasma-org.kde.plasma.desktop-appletsrc" - - mkdir -p "${target_home}/.config" - if [[ ! -f "${applet_config}" ]]; then - if command -v kwriteconfig6 &>/dev/null; then - kwriteconfig6 --file "${applet_config}" \ - --group Containments --group 1 --group Wallpaper \ - --group org.kde.image --group General \ - --key Image "file://${wallpaper_dst}" - kwriteconfig6 --file "${applet_config}" \ - --group Containments --group 1 --group Wallpaper \ - --group org.kde.image --group General \ - --key FillMode 2 - else - cat >> "${applet_config}" <<EOF - -[Containments][1][Wallpaper][org.kde.image][General] -FillMode=2 -Image=file://${wallpaper_dst} -EOF - fi - else - local containments - containments=$(grep -oP '(?<=^\[Containments\]\[)\d+(?=\])' "${applet_config}" | sort -un) - [[ -z "${containments}" ]] && containments="1" - for c in ${containments}; do - if command -v kwriteconfig6 &>/dev/null; then - kwriteconfig6 --file "${applet_config}" \ - --group Containments --group "${c}" --group Wallpaper \ - --group org.kde.image --group General \ - --key Image "file://${wallpaper_dst}" - kwriteconfig6 --file "${applet_config}" \ - --group Containments --group "${c}" --group Wallpaper \ - --group org.kde.image --group General \ - --key FillMode 2 - fi - done - fi -} - -write_kickoff_config() { - local target_home="$1" - local kickoff_image="${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" - [[ -f "$kickoff_image" ]] || kickoff_image="/usr/share/pixmaps/raveos-logo.svg" - [[ -f "$kickoff_image" ]] || kickoff_image="/usr/share/icons/breeze/applets/256/org.kde.plasma.kickoff.svg" - [[ -f "${target_home}/.config/plasma-org.kde.plasma.desktop-appletsrc" ]] || return 0 - - while IFS=: read -r containment applet; do - [[ -n "${containment}" && -n "${applet}" ]] || continue - if command -v kwriteconfig6 &>/dev/null; then - kwriteconfig6 --file "${target_home}/.config/plasma-org.kde.plasma.desktop-appletsrc" \ - --group Containments --group "${containment}" --group Applets \ - --group "${applet}" --group Configuration --group General \ - --key useCustomButtonImage true - kwriteconfig6 --file "${target_home}/.config/plasma-org.kde.plasma.desktop-appletsrc" \ - --group Containments --group "${containment}" --group Applets \ - --group "${applet}" --group Configuration --group General \ - --key customButtonImage "file://${kickoff_image}" - kwriteconfig6 --file "${target_home}/.config/plasma-org.kde.plasma.desktop-appletsrc" \ - --group Containments --group "${containment}" --group Applets \ - --group "${applet}" --group Configuration --group General \ - --key icon "${kickoff_image}" - else - cat >> "${target_home}/.config/plasma-org.kde.plasma.desktop-appletsrc" <<EOF - -[Containments][${containment}][Applets][${applet}][Configuration][General] -customButtonImage=file://${kickoff_image} -icon=${kickoff_image} -useCustomButtonImage=true -EOF - fi - done < <( - awk ' - match($0, /^\[Containments\]\[([0-9]+)\]\[Applets\]\[([0-9]+)\]$/, m) { c=m[1]; a=m[2]; next } - /^plugin=org\.kde\.plasma\.(kickoff|kicker|simplemenu|kickoffdashboard)$/ && c != "" && a != "" { print c ":" a } - ' "${target_home}/.config/plasma-org.kde.plasma.desktop-appletsrc" | sort -u - ) +KSEOF } write_kscreenlockerrc() { local target_home="$1" mkdir -p "${target_home}/.config" - cat > "${target_home}/.config/kscreenlockerrc" <<EOF + cat > "${target_home}/.config/kscreenlockerrc" <<KLEOF [Greeter][Wallpaper][org.kde.image][General] FillMode=2 Image=file://${wallpaper_dst} -EOF +KLEOF } write_ksplashrc() { local target_home="$1" mkdir -p "${target_home}/.config" - cat > "${target_home}/.config/ksplashrc" <<'EOF' + cat > "${target_home}/.config/ksplashrc" <<'SPLEOF' [KSplash] Engine=KSplashQML Theme=org.kde.raveos.desktop -EOF +SPLEOF } -# --------------------------------------------------------------------------- -# RENDSZERSZINTŰ TELEPÍTÉS -# --------------------------------------------------------------------------- - -# Háttérkép rendszerkönyvtárba -[[ -f "${PAYLOAD}/background" ]] && \ - install -Dm644 "${PAYLOAD}/background" "$wallpaper_dst" - -# 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 - -# Kickoff/rendszer ikon globálisan -if [[ -f "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" ]]; then - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" /usr/share/pixmaps/raveos-logo.svg - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - /usr/share/icons/hicolor/scalable/apps/raveos-logo.svg - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - /usr/share/icons/hicolor/scalable/apps/distributor-logo-raveos.svg - - for theme in breeze breeze-dark hicolor; do - [[ -d "/usr/share/icons/${theme}" ]] || continue - find "/usr/share/icons/${theme}" -name "start-here*" -delete 2>/dev/null || true - find "/usr/share/icons/${theme}" -name "distributor-logo*" -delete 2>/dev/null || true - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - "/usr/share/icons/${theme}/scalable/places/start-here-kde.svg" - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - "/usr/share/icons/${theme}/scalable/places/start-here.svg" - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - "/usr/share/icons/${theme}/scalable/places/distributor-logo.svg" - done - - for dir in \ - /usr/local/share/icons/breeze/applets/256 \ - /usr/local/share/icons/breeze-dark/applets/256 \ - /usr/share/icons/breeze/applets/256 \ - /usr/share/icons/breeze-dark/applets/256; do - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - "${dir}/org.kde.plasma.kickoff.svg" - done - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - /usr/local/share/icons/Adwaita/symbolic/places/start-here-symbolic.svg - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - /usr/share/icons/Adwaita/symbolic/places/start-here-symbolic.svg - for size in 22 32 64 96; do - for dir in \ - /usr/local/share/icons/breeze/places/${size} \ - /usr/local/share/icons/breeze-dark/places/${size} \ - /usr/share/icons/breeze/places/${size} \ - /usr/share/icons/breeze-dark/places/${size}; do - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - "${dir}/start-here-kde.svg" - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - "${dir}/start-here.svg" - done - done -fi - -# Plasma splash téma -if [[ -d "${PAYLOAD}/plasma-splash" ]]; then - mkdir -p /usr/share/plasma/look-and-feel - rm -rf /usr/share/plasma/look-and-feel/org.kde.raveos.desktop - cp -r --no-preserve=ownership "${PAYLOAD}/plasma-splash" \ - /usr/share/plasma/look-and-feel/org.kde.raveos.desktop -fi - -# SDDM: a téma és konfig a PKGBUILD + .install hook által van telepítve, itt nincs teendő - -# --------------------------------------------------------------------------- -# MEGLÉVŐ USEREK FRISSÍTÉSE -# /etc/passwd alapján minden UID >= 1000 bejelentkező user home-ja -# --------------------------------------------------------------------------- - -apply_user_payload() { - local target_user="$1" - local passwd_line target_uid target_gid target_home - - passwd_line="$(getent passwd "$target_user" || true)" - [[ -n "$passwd_line" ]] || return 0 - IFS=: read -r _ _ target_uid target_gid _ target_home _ <<<"$passwd_line" - [[ -d "$target_home" ]] || return 0 - - mkdir -p \ - "${target_home}/.config/kitty" \ - "${target_home}/.config/fastfetch" \ - "${target_home}/.config/autostart" \ - "${target_home}/.local/share/konsole" \ - "${target_home}/.local/share/icons/breeze/applets/256" \ - "${target_home}/.local/share/icons/breeze-dark/applets/256" \ - "${target_home}/.local/share/icons/breeze/places/22" \ - "${target_home}/.local/share/icons/breeze/places/32" \ - "${target_home}/.local/share/icons/breeze/places/64" \ - "${target_home}/.local/share/icons/breeze/places/96" \ - "${target_home}/.local/share/icons/breeze-dark/places/22" \ - "${target_home}/.local/share/icons/breeze-dark/places/32" \ - "${target_home}/.local/share/icons/breeze-dark/places/64" \ - "${target_home}/.local/share/icons/breeze-dark/places/96" \ - "${target_home}/.local/share/icons/Adwaita/symbolic/places" - - install -Dm644 "$wallpaper_dst" "${target_home}/.config/background" - - [[ -f "${PAYLOAD}/kitty/kitty.conf" ]] && \ - install -Dm644 "${PAYLOAD}/kitty/kitty.conf" "${target_home}/.config/kitty/kitty.conf" - for f in config.jsonc config-kitty.jsonc raveos-logo.png raveos-logo.txt; do - [[ -f "${PAYLOAD}/fastfetch/${f}" ]] && \ - install -Dm644 "${PAYLOAD}/fastfetch/${f}" "${target_home}/.config/fastfetch/${f}" - done - [[ -f "${PAYLOAD}/konsole/RaveOS.colorscheme" ]] && \ - install -Dm644 "${PAYLOAD}/konsole/RaveOS.colorscheme" \ - "${target_home}/.local/share/konsole/RaveOS.colorscheme" - [[ -f "${PAYLOAD}/konsole/RaveOS.profile" ]] && \ - install -Dm644 "${PAYLOAD}/konsole/RaveOS.profile" \ - "${target_home}/.local/share/konsole/RaveOS.profile" - - if [[ -f "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" ]]; then - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - "${target_home}/.local/share/icons/breeze/applets/256/org.kde.plasma.kickoff.svg" - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - "${target_home}/.local/share/icons/breeze-dark/applets/256/org.kde.plasma.kickoff.svg" - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - "${target_home}/.local/share/icons/Adwaita/symbolic/places/start-here-symbolic.svg" - for size in 22 32 64 96; do - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - "${target_home}/.local/share/icons/breeze/places/${size}/start-here-kde.svg" - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - "${target_home}/.local/share/icons/breeze-dark/places/${size}/start-here-kde.svg" - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - "${target_home}/.local/share/icons/breeze/places/${size}/start-here.svg" - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - "${target_home}/.local/share/icons/breeze-dark/places/${size}/start-here.svg" - done - fi +write_kdeglobals() { + local target_home="$1" + mkdir -p "${target_home}/.config" + cat > "${target_home}/.config/kdeglobals" <<'GLBEOF' +[General] +ColorScheme=BreezeDark - write_konsolerc "$target_home" - write_kxkbrc "$target_home" - write_plasma_wallpaper_config "$target_home" - write_kickoff_config "$target_home" - write_kscreenlockerrc "$target_home" - write_ksplashrc "$target_home" - disable_kmix_autostart "$target_home" - ensure_bashrc_hook "${target_home}/.bashrc" +[Icons] +Theme=breeze-dark - chown -R "${target_uid}:${target_gid}" \ - "${target_home}/.config" "${target_home}/.local" "${target_home}/.bashrc" +[KDE] +widgetStyle=Breeze +GLBEOF } -while IFS=: read -r user _ uid _ _ home shell; do - [[ "$uid" -ge 1000 ]] || continue - [[ -d "$home" ]] || continue - [[ "$shell" != "/usr/bin/nologin" && "$shell" != "/bin/false" ]] || continue - apply_user_payload "$user" -done < /etc/passwd - -# --------------------------------------------------------------------------- -# SKEL TELEPÍTÉS -# Új usereknek (useradd által másolt /etc/skel tartalom) -# --------------------------------------------------------------------------- - +# skel konfiguráció új felhasználóknak mkdir -p \ /etc/skel/.config/kitty \ /etc/skel/.config/fastfetch \ /etc/skel/.config/autostart \ - /etc/skel/.local/share/konsole \ - /etc/skel/.local/share/icons/breeze/applets/256 \ - /etc/skel/.local/share/icons/breeze-dark/applets/256 \ - /etc/skel/.local/share/icons/breeze/places/22 \ - /etc/skel/.local/share/icons/breeze/places/32 \ - /etc/skel/.local/share/icons/breeze/places/64 \ - /etc/skel/.local/share/icons/breeze/places/96 \ - /etc/skel/.local/share/icons/breeze-dark/places/22 \ - /etc/skel/.local/share/icons/breeze-dark/places/32 \ - /etc/skel/.local/share/icons/breeze-dark/places/64 \ - /etc/skel/.local/share/icons/breeze-dark/places/96 \ - /etc/skel/.local/share/icons/Adwaita/symbolic/places + /etc/skel/.config/raveos \ + /etc/skel/.local/share/konsole [[ -f "${PAYLOAD}/background" ]] && \ install -Dm644 "${PAYLOAD}/background" /etc/skel/.config/background + [[ -f "${PAYLOAD}/kitty/kitty.conf" ]] && \ install -Dm644 "${PAYLOAD}/kitty/kitty.conf" /etc/skel/.config/kitty/kitty.conf + 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 + [[ -f "${PAYLOAD}/konsole/RaveOS.colorscheme" ]] && \ install -Dm644 "${PAYLOAD}/konsole/RaveOS.colorscheme" /etc/skel/.local/share/konsole/RaveOS.colorscheme [[ -f "${PAYLOAD}/konsole/RaveOS.profile" ]] && \ install -Dm644 "${PAYLOAD}/konsole/RaveOS.profile" /etc/skel/.local/share/konsole/RaveOS.profile -if [[ -f "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" ]]; then - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - /etc/skel/.local/share/icons/breeze/applets/256/org.kde.plasma.kickoff.svg - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - /etc/skel/.local/share/icons/breeze-dark/applets/256/org.kde.plasma.kickoff.svg - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - /etc/skel/.local/share/icons/Adwaita/symbolic/places/start-here-symbolic.svg - for size in 22 32 64 96; do - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - "/etc/skel/.local/share/icons/breeze/places/${size}/start-here-kde.svg" - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - "/etc/skel/.local/share/icons/breeze-dark/places/${size}/start-here-kde.svg" - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - "/etc/skel/.local/share/icons/breeze/places/${size}/start-here.svg" - install -Dm644 "${PAYLOAD}/plasma/org.kde.plasma.kickoff.svg" \ - "/etc/skel/.local/share/icons/breeze-dark/places/${size}/start-here.svg" - done -fi - write_konsolerc /etc/skel -write_plasma_wallpaper_config /etc/skel -write_kickoff_config /etc/skel write_kscreenlockerrc /etc/skel write_ksplashrc /etc/skel +write_kdeglobals /etc/skel disable_kmix_autostart /etc/skel ensure_bashrc_hook /etc/skel/.bashrc +echo "1" > /etc/skel/.config/raveos/plasma-migrated -command -v gtk-update-icon-cache &>/dev/null && \ - gtk-update-icon-cache -f -t /usr/share/icons/hicolor || true +# meglévő felhasználók frissítése +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/kitty" \ + "${home}/.config/fastfetch" \ + "${home}/.config/autostart" \ + "${home}/.config/raveos" \ + "${home}/.local/share/konsole" + + if [[ ! -f "${home}/.config/kitty/kitty.conf" && -f "${PAYLOAD}/kitty/kitty.conf" ]]; then + install -Dm644 "${PAYLOAD}/kitty/kitty.conf" "${home}/.config/kitty/kitty.conf" + fi + + for f in config.jsonc config-kitty.jsonc raveos-logo.png raveos-logo.txt; do + if [[ ! -f "${home}/.config/fastfetch/${f}" && -f "${PAYLOAD}/fastfetch/${f}" ]]; then + install -Dm644 "${PAYLOAD}/fastfetch/${f}" "${home}/.config/fastfetch/${f}" + fi + done + + if [[ ! -f "${home}/.local/share/konsole/RaveOS.colorscheme" && -f "${PAYLOAD}/konsole/RaveOS.colorscheme" ]]; then + install -Dm644 "${PAYLOAD}/konsole/RaveOS.colorscheme" "${home}/.local/share/konsole/RaveOS.colorscheme" + fi + + if [[ ! -f "${home}/.local/share/konsole/RaveOS.profile" && -f "${PAYLOAD}/konsole/RaveOS.profile" ]]; then + install -Dm644 "${PAYLOAD}/konsole/RaveOS.profile" "${home}/.local/share/konsole/RaveOS.profile" + fi + + if [[ ! -f "${home}/.config/konsolerc" ]]; then + write_konsolerc "${home}" + fi + + if [[ ! -f "${home}/.config/autostart/kmix_autostart.desktop" ]]; then + disable_kmix_autostart "${home}" + fi + + ensure_bashrc_hook "${home}/.bashrc" + echo "1" > "${home}/.config/raveos/plasma-migrated" + + chown "${uid}:${gid}" "${home}/.config" "${home}/.local" 2>/dev/null || true + chown -R "${uid}:${gid}" \ + "${home}/.config/kitty" \ + "${home}/.config/fastfetch" \ + "${home}/.config/autostart" \ + "${home}/.config/raveos" \ + "${home}/.local/share/konsole" \ + "${home}/.bashrc" 2>/dev/null || true + +done < /etc/passwd -echo "Telepítés kész." +echo "RaveOS Plasma beállítás sikeresen alkalmazva." diff --git a/raveos-plasma-theme/raveos-plasma-first-login.sh b/raveos-plasma-theme/raveos-plasma-first-login.sh index a1a3720..ce3561d 100644..100755 --- a/raveos-plasma-theme/raveos-plasma-first-login.sh +++ b/raveos-plasma-theme/raveos-plasma-first-login.sh @@ -1,11 +1,10 @@ #!/usr/bin/env bash set -euo pipefail -marker_dir="${HOME}/.config/raveos-kde-theme" -marker_file="${marker_dir}/.first-login-done" +marker_dir="${HOME}/.config/raveos" +marker_file="${marker_dir}/plasma-first-login-done" wallpaper="/usr/share/backgrounds/raveos/raveos-main-bg.jpeg" kickoff_image="/usr/share/raveos/plasma-theme/theme-data/plasma/org.kde.plasma.kickoff.svg" -applet_config="${HOME}/.config/plasma-org.kde.plasma.desktop-appletsrc" mkdir -p "${marker_dir}" [[ -e "${marker_file}" ]] && exit 0 @@ -15,25 +14,17 @@ until qdbus6 org.kde.plasmashell /PlasmaShell >/dev/null 2>&1 || qdbus org.kde.p sleep 2 done -sleep 10 +sleep 5 QDBUS="" if command -v qdbus6 >/dev/null 2>&1; then - QDBUS="qdbus6" + QDBUS="qdbus6" elif command -v qdbus >/dev/null 2>&1; then - QDBUS="qdbus" + QDBUS="qdbus" fi if command -v plasma-apply-lookandfeel >/dev/null 2>&1; then - plasma-apply-lookandfeel -a org.kde.breezedark.desktop >/dev/null 2>&1 || true -fi - -if command -v kwriteconfig6 >/dev/null 2>&1; then - kwriteconfig6 --file "${HOME}/.config/ksplashrc" --group KSplash --key Engine KSplashQML - kwriteconfig6 --file "${HOME}/.config/ksplashrc" --group KSplash --key Theme org.kde.raveos.desktop - kwriteconfig6 --file "${HOME}/.config/kdeglobals" --group KDE --key widgetStyle Breeze - kwriteconfig6 --file "${HOME}/.config/kdeglobals" --group General --key ColorScheme BreezeDark - kwriteconfig6 --file "${HOME}/.config/kdeglobals" --group Icons --key Theme breeze-dark + plasma-apply-lookandfeel -a org.kde.breezedark.desktop >/dev/null 2>&1 || true fi if [[ -f "${wallpaper}" ]] && command -v plasma-apply-wallpaperimage >/dev/null 2>&1; then @@ -41,39 +32,38 @@ if [[ -f "${wallpaper}" ]] && command -v plasma-apply-wallpaperimage >/dev/null fi if [[ -n "$QDBUS" ]]; then - $QDBUS org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript " - if ('${wallpaper}' !== '') { - var desktops = desktops(); - for (var i = 0; i < desktops.length; i++) { - desktops[i].wallpaperPlugin = 'org.kde.image'; - desktops[i].currentConfigGroup = ['Wallpaper', 'org.kde.image', 'General']; - desktops[i].writeConfig('Image', 'file://${wallpaper}'); - desktops[i].writeConfig('FillMode', 2); - } - } - - if ('${kickoff_image}' !== '') { - function setKickoffIcon(applet, iconPath) { - var groups = [['Configuration', 'General'], ['General']]; - for (var i = 0; i < groups.length; i++) { - applet.currentConfigGroup = groups[i]; - applet.writeConfig('useCustomButtonImage', 'true'); - applet.writeConfig('customButtonImage', 'file://' + iconPath); - applet.writeConfig('icon', iconPath); + $QDBUS org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript " + if ('${wallpaper}' !== '') { + var d = desktops(); + for (var i = 0; i < d.length; i++) { + d[i].wallpaperPlugin = 'org.kde.image'; + d[i].currentConfigGroup = ['Wallpaper', 'org.kde.image', 'General']; + d[i].writeConfig('Image', 'file://${wallpaper}'); + d[i].writeConfig('FillMode', 2); + } } - } - var panels = panels(); - for (var i = 0; i < panels.length; i++) { - var applets = panels[i].applets; - for (var j = 0; j < applets.length; j++) { - var plugin = applets[j].pluginName; - if (plugin === 'org.kde.plasma.kickoff' || plugin === 'org.kde.plasma.kicker' || plugin === 'org.kde.plasma.simplemenu' || plugin === 'org.kde.plasma.kickoffdashboard') { - setKickoffIcon(applets[j], '${kickoff_image}'); - } + if ('${kickoff_image}' !== '') { + function setKickoff(applet, path) { + var g = [['Configuration', 'General'], ['General']]; + for (var i = 0; i < g.length; i++) { + applet.currentConfigGroup = g[i]; + applet.writeConfig('useCustomButtonImage', 'true'); + applet.writeConfig('customButtonImage', 'file://' + path); + applet.writeConfig('icon', path); + } + } + var p = panels(); + for (var i = 0; i < p.length; i++) { + var a = p[i].applets; + for (var j = 0; j < a.length; j++) { + var pl = a[j].pluginName; + if (pl === 'org.kde.plasma.kickoff' || pl === 'org.kde.plasma.kicker' || pl === 'org.kde.plasma.simplemenu' || pl === 'org.kde.plasma.kickoffdashboard') { + setKickoff(a[j], '${kickoff_image}'); + } + } + } } - } - } - " >/dev/null 2>&1 || true + " >/dev/null 2>&1 || true fi touch "${marker_file}" diff --git a/raveos-plasma-theme/raveos-plasma-theme-apply.service b/raveos-plasma-theme/raveos-plasma-theme-apply.service index 90cfc9c..b66ba42 100644 --- a/raveos-plasma-theme/raveos-plasma-theme-apply.service +++ b/raveos-plasma-theme/raveos-plasma-theme-apply.service @@ -8,6 +8,7 @@ ConditionPathExists=!/var/lib/raveos-plasma-theme/.applied Type=oneshot ExecStart=/usr/lib/raveos-plasma-theme/auto-apply.sh ExecStartPost=/usr/bin/install -Dm644 /dev/null /var/lib/raveos-plasma-theme/.applied +RemainAfterExit=yes [Install] WantedBy=multi-user.target diff --git a/raveos-plasma-theme/raveos-plasma-theme.install b/raveos-plasma-theme/raveos-plasma-theme.install index 9461d16..fbca6ac 100644 --- a/raveos-plasma-theme/raveos-plasma-theme.install +++ b/raveos-plasma-theme/raveos-plasma-theme.install @@ -9,7 +9,5 @@ post_install() { } post_upgrade() { - # Do not rewrite a live Plasma session from inside a pacman transaction. - rm -f /var/lib/raveos-plasma-theme/.applied _enable_apply_service } |