commit d288b4e77c80a4c81a5ebcbfab5f04df0ebcdd00 Author: Nathan Date: Thu Feb 5 11:59:45 2026 -0600 Initial upload: plasmazones 1.3.4 diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..82bad7c9cfd7 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,37 @@ +pkgbase = plasmazones + pkgdesc = FancyZones-style window tiling for KDE Plasma + pkgver = 0.0.0 + pkgrel = 1 + url = https://github.com/fuddlesworth/PlasmaZones + install = plasmazones.install + arch = x86_64 + license = GPL-3.0-or-later + makedepends = cmake + makedepends = extra-cmake-modules + makedepends = qt6-tools + makedepends = qt6-shadertools + depends = qt6-base + depends = qt6-declarative + depends = qt6-shadertools + depends = kconfig + depends = kconfigwidgets + depends = kcoreaddons + depends = kdbusaddons + depends = ki18n + depends = kcmutils + depends = kwindowsystem + depends = kglobalaccel + depends = knotifications + depends = kcolorscheme + depends = layer-shell-qt + optdepends = plasma-activities: activity-based layouts + provides = plasmazones + conflicts = plasmazones-git + source = plasmazones-0.0.0.tar.gz::https://github.com/fuddlesworth/PlasmaZones/archive/refs/tags/v0.0.0.tar.gz + source = kbuildsycoca.hook + source = plasmazones-refresh-sycoca + sha256sums = 1836cc5877937666e1b139a4219d3a7cbf124551abc211e8ede5b09907403ae8 + sha256sums = 8bd1b7fe1ca040f18fc0aa95f5da775cdbc1b090a23f63d8e16dd572cbba3c80 + sha256sums = f128058da53fd97e6a35718348fefa219b6352517bd13f6a1039368872cb0b6d + +pkgname = plasmazones diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..618e89cdf216 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,72 @@ +# Maintainer: fuddlesworth +# PlasmaZones - FancyZones-style window tiling for KDE Plasma +# SPDX-License-Identifier: GPL-3.0-or-later +# +# pkgver is set by CI from the git tag when building in the release workflow. +# For local/AUR builds, update pkgver and sha256sums to match the release tarball. + +pkgname=plasmazones +pkgver=0.0.0 +pkgrel=1 +pkgdesc="FancyZones-style window tiling for KDE Plasma" +arch=('x86_64') +url="https://github.com/fuddlesworth/PlasmaZones" +license=('GPL-3.0-or-later') +depends=( + 'qt6-base' + 'qt6-declarative' + 'qt6-shadertools' + 'kconfig' + 'kconfigwidgets' + 'kcoreaddons' + 'kdbusaddons' + 'ki18n' + 'kcmutils' + 'kwindowsystem' + 'kglobalaccel' + 'knotifications' + 'kcolorscheme' + 'layer-shell-qt' +) +makedepends=( + 'cmake' + 'extra-cmake-modules' + 'qt6-tools' + 'qt6-shadertools' +) +optdepends=( + 'plasma-activities: activity-based layouts' +) +provides=('plasmazones') +conflicts=('plasmazones-git') +source=( + "$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz" + "kbuildsycoca.hook" + "plasmazones-refresh-sycoca" +) +sha256sums=( + '1836cc5877937666e1b139a4219d3a7cbf124551abc211e8ede5b09907403ae8' + '8bd1b7fe1ca040f18fc0aa95f5da775cdbc1b090a23f63d8e16dd572cbba3c80' + 'f128058da53fd97e6a35718348fefa219b6352517bd13f6a1039368872cb0b6d' +) +install=plasmazones.install + +build() { + cmake -B build -S "PlasmaZones-$pkgver" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_TESTING=OFF \ + -Wno-dev + cmake --build build --parallel +} + +package() { + DESTDIR="$pkgdir" cmake --install build + + # Install pacman hook to auto-refresh sycoca cache + install -Dm644 kbuildsycoca.hook \ + "$pkgdir/usr/share/libalpm/hooks/plasmazones-kbuildsycoca.hook" + install -Dm755 plasmazones-refresh-sycoca \ + "$pkgdir/usr/share/libalpm/scripts/plasmazones-refresh-sycoca" +} diff --git a/kbuildsycoca.hook b/kbuildsycoca.hook new file mode 100644 index 000000000000..155ad867f1d6 --- /dev/null +++ b/kbuildsycoca.hook @@ -0,0 +1,17 @@ +# Pacman hook to refresh KDE sycoca cache when KCM modules are installed +# Ensures new System Settings modules are immediately visible +# +# SPDX-License-Identifier: GPL-3.0-or-later + +[Trigger] +Type = Path +Operation = Install +Operation = Upgrade +Operation = Remove +Target = usr/lib/qt6/plugins/plasma/kcms/systemsettings/*.so +Target = usr/share/applications/kcm_*.desktop + +[Action] +Description = Refreshing KDE service cache... +When = PostTransaction +Exec = /usr/share/libalpm/scripts/plasmazones-refresh-sycoca diff --git a/plasmazones-refresh-sycoca b/plasmazones-refresh-sycoca new file mode 100755 index 000000000000..84cade1ec720 --- /dev/null +++ b/plasmazones-refresh-sycoca @@ -0,0 +1,19 @@ +#!/bin/bash +# Refresh KDE sycoca cache for all logged-in users with KDE sessions +# This script is called by the pacman hook after KCM installation +# +# SPDX-License-Identifier: GPL-3.0-or-later + +# Find all users running kded6 (indicates active KDE session) +for pid in $(pgrep -x kded6); do + user=$(ps -o user= -p "$pid" 2>/dev/null | tr -d ' ') + if [ -n "$user" ] && [ "$user" != "root" ]; then + # Run kbuildsycoca6 as that user + su - "$user" -c "kbuildsycoca6 --noincremental" >/dev/null 2>&1 & + fi +done + +# Wait for all background jobs +wait 2>/dev/null + +exit 0 diff --git a/plasmazones.install b/plasmazones.install new file mode 100644 index 000000000000..cb4c28b5db6f --- /dev/null +++ b/plasmazones.install @@ -0,0 +1,67 @@ +# PlasmaZones pacman install hooks +# SPDX-License-Identifier: GPL-3.0-or-later + +post_install() { + # Refresh sycoca for logged-in KDE users (makes KCM immediately visible) + _refresh_sycoca + + echo "" + echo "══════════════════════════════════════════════════════════════════" + echo " PlasmaZones installed successfully!" + echo "══════════════════════════════════════════════════════════════════" + echo "" + echo " Settings: System Settings -> Window Management -> PlasmaZones" + echo "" + echo " To enable the daemon:" + echo " systemctl --user enable --now plasmazones.service" + echo "" + echo " If PlasmaZones doesn't appear in System Settings, run:" + echo " kbuildsycoca6 --noincremental" + echo " or log out and back in." + echo "" +} + +post_upgrade() { + # Refresh sycoca in case KCM metadata changed + _refresh_sycoca + + echo "" + echo "══════════════════════════════════════════════════════════════════" + echo " PlasmaZones upgraded!" + echo "══════════════════════════════════════════════════════════════════" + echo "" + echo " If the daemon was running, restart it:" + echo " systemctl --user restart plasmazones.service" + echo "" +} + +post_remove() { + echo "" + echo " Stopping PlasmaZones daemon..." + + # Stop for all users + for pid in $(pgrep -x kded6 2>/dev/null); do + user=$(ps -o user= -p "$pid" 2>/dev/null | tr -d ' ') + if [ -n "$user" ] && [ "$user" != "root" ]; then + su - "$user" -c "systemctl --user stop plasmazones.service 2>/dev/null; systemctl --user disable plasmazones.service 2>/dev/null" & + fi + done + wait 2>/dev/null + + # Refresh sycoca to remove KCM from System Settings + _refresh_sycoca + + echo " PlasmaZones removed." + echo "" +} + +# Helper: refresh sycoca cache for all logged-in KDE users +_refresh_sycoca() { + for pid in $(pgrep -x kded6 2>/dev/null); do + user=$(ps -o user= -p "$pid" 2>/dev/null | tr -d ' ') + if [ -n "$user" ] && [ "$user" != "root" ]; then + su - "$user" -c "kbuildsycoca6 --noincremental" >/dev/null 2>&1 & + fi + done + wait 2>/dev/null +}