summaryrefslogtreecommitdiff
path: root/system_files/usr
diff options
context:
space:
mode:
authortranch <tranch.xiao@gmail.com>2026-08-27 08:08:00 +0800
committertranch <tranch.xiao@gmail.com>2026-08-27 08:53:05 +0800
commite4608f18bc3a5ad307e1a1deaa7ac0048d03f991 (patch)
treee834c91a7e27e118255f831a0d28fcc25ceddd85 /system_files/usr
parent31ee20282a23dfc1244c003a97a2656afffdd4a2 (diff)
downloadAeroCore-OS-e4608f18bc3a5ad307e1a1deaa7ac0048d03f991.tar.gz
AeroCore-OS-e4608f18bc3a5ad307e1a1deaa7ac0048d03f991.zip
fix: replace symlinked desktop branding assets
Diffstat (limited to 'system_files/usr')
-rw-r--r--system_files/usr/lib/systemd/system/aerocore-desktop-branding.service11
-rwxr-xr-xsystem_files/usr/libexec/aerocore-desktop-branding28
-rw-r--r--system_files/usr/share/aerocore/desktop-branding/kcm-about-distrorc5
-rw-r--r--system_files/usr/share/plasma/look-and-feel/com.valve.vapor.desktop/contents/plasmoidsetupscripts/org.kde.plasma.kickoff.js5
-rw-r--r--system_files/usr/share/plasma/look-and-feel/com.valve.vgui.desktop/contents/plasmoidsetupscripts/org.kde.plasma.kickoff.js5
5 files changed, 54 insertions, 0 deletions
diff --git a/system_files/usr/lib/systemd/system/aerocore-desktop-branding.service b/system_files/usr/lib/systemd/system/aerocore-desktop-branding.service
new file mode 100644
index 0000000..fee52f1
--- /dev/null
+++ b/system_files/usr/lib/systemd/system/aerocore-desktop-branding.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Apply AeroCore desktop branding migrations
+After=local-fs.target
+Before=display-manager.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/libexec/aerocore-desktop-branding
+
+[Install]
+WantedBy=graphical.target
diff --git a/system_files/usr/libexec/aerocore-desktop-branding b/system_files/usr/libexec/aerocore-desktop-branding
new file mode 100755
index 0000000..8b8b9e0
--- /dev/null
+++ b/system_files/usr/libexec/aerocore-desktop-branding
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+# The optional prefix makes the migration testable without touching the host.
+root_prefix="${AEROCORE_DESKTOP_BRANDING_ROOT:-}"
+about_source="${root_prefix}/usr/share/aerocore/desktop-branding/kcm-about-distrorc"
+about_target="${root_prefix}/etc/xdg/kcm-about-distrorc"
+
+# Existing installations can retain Bazzite's old /etc copy across deployment
+# updates. Only replace that known upstream default; administrator changes win.
+if [[ -f "${about_source}" ]] &&
+ { [[ ! -f "${about_target}" ]] || grep -Fxq 'Name=Bazzite' "${about_target}"; }; then
+ install -Dm0644 "${about_source}" "${about_target}"
+fi
+
+# Deck's stock look-and-feel stores this value in each user's Plasma config.
+# Migrate only the unmodified upstream value so users can still choose an icon.
+shopt -s nullglob
+for plasma_config in "${root_prefix}"/var/home/*/.config/plasma-org.kde.plasma.desktop-appletsrc \
+ "${root_prefix}"/home/*/.config/plasma-org.kde.plasma.desktop-appletsrc; do
+ if grep -Fxq 'icon=distributor-logo-steamdeck' "${plasma_config}"; then
+ updated_config="$(mktemp "${plasma_config}.XXXXXX")"
+ sed 's/^icon=distributor-logo-steamdeck$/icon=aerocore-logo/' "${plasma_config}" > "${updated_config}"
+ cat "${updated_config}" > "${plasma_config}"
+ rm -f "${updated_config}"
+ fi
+done
diff --git a/system_files/usr/share/aerocore/desktop-branding/kcm-about-distrorc b/system_files/usr/share/aerocore/desktop-branding/kcm-about-distrorc
new file mode 100644
index 0000000..ed2c831
--- /dev/null
+++ b/system_files/usr/share/aerocore/desktop-branding/kcm-about-distrorc
@@ -0,0 +1,5 @@
+[General]
+LogoPath=/usr/share/pixmaps/system-logo-white.png
+Name=AeroCore OS
+Website=https://os.aerocore.com.cn
+Variant=Handheld & HTPC Edition
diff --git a/system_files/usr/share/plasma/look-and-feel/com.valve.vapor.desktop/contents/plasmoidsetupscripts/org.kde.plasma.kickoff.js b/system_files/usr/share/plasma/look-and-feel/com.valve.vapor.desktop/contents/plasmoidsetupscripts/org.kde.plasma.kickoff.js
new file mode 100644
index 0000000..76ec66d
--- /dev/null
+++ b/system_files/usr/share/plasma/look-and-feel/com.valve.vapor.desktop/contents/plasmoidsetupscripts/org.kde.plasma.kickoff.js
@@ -0,0 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+applet.currentConfigGroup = ["General"]
+applet.writeConfig("icon", "aerocore-logo")
+applet.reloadConfig()
diff --git a/system_files/usr/share/plasma/look-and-feel/com.valve.vgui.desktop/contents/plasmoidsetupscripts/org.kde.plasma.kickoff.js b/system_files/usr/share/plasma/look-and-feel/com.valve.vgui.desktop/contents/plasmoidsetupscripts/org.kde.plasma.kickoff.js
new file mode 100644
index 0000000..76ec66d
--- /dev/null
+++ b/system_files/usr/share/plasma/look-and-feel/com.valve.vgui.desktop/contents/plasmoidsetupscripts/org.kde.plasma.kickoff.js
@@ -0,0 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+applet.currentConfigGroup = ["General"]
+applet.writeConfig("icon", "aerocore-logo")
+applet.reloadConfig()