commit c9bc8f879f59787f884eeb10f71e759e66e867be Author: Nathan Date: Thu Feb 5 12:01:37 2026 -0600 Initial upload: plasmazones-bin 1.3.4 diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..94e0253c0a68 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,34 @@ +pkgbase = plasmazones-bin + pkgdesc = FancyZones-style window tiling for KDE Plasma (prebuilt binary) + pkgver = 1.3.4 + pkgrel = 1 + url = https://github.com/fuddlesworth/PlasmaZones + install = plasmazones.install + arch = x86_64 + license = GPL-3.0-or-later + 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 + conflicts = plasmazones-git + source = plasmazones-bin-1.3.4.pkg.tar.zst::https://github.com/fuddlesworth/PlasmaZones/releases/download/v1.3.4/plasmazones-1.3.4-1-x86_64.pkg.tar.zst + source = kbuildsycoca.hook + source = plasmazones-refresh-sycoca + sha256sums = f21bf6aa1ffa6f0d5d59ad3bd1f6a8b0b54227ce482446e502ff67c0a7cf4e29 + sha256sums = 8bd1b7fe1ca040f18fc0aa95f5da775cdbc1b090a23f63d8e16dd572cbba3c80 + sha256sums = f128058da53fd97e6a35718348fefa219b6352517bd13f6a1039368872cb0b6d + +pkgname = plasmazones-bin diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..72b6e38a5d88 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,61 @@ +# Maintainer: fuddlesworth +# PlasmaZones (binary) - FancyZones-style window tiling for KDE Plasma +# SPDX-License-Identifier: GPL-3.0-or-later +# +# Binary package - downloads prebuilt binaries from GitHub releases. +# For source-based package, see: https://aur.archlinux.org/packages/plasmazones + +pkgname=plasmazones-bin +pkgver=1.3.4 +pkgrel=1 +pkgdesc="FancyZones-style window tiling for KDE Plasma (prebuilt binary)" +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' +) +optdepends=( + 'plasma-activities: activity-based layouts' +) +provides=('plasmazones') +conflicts=('plasmazones' 'plasmazones-git') +source=( + "$pkgname-$pkgver.pkg.tar.zst::$url/releases/download/v$pkgver/plasmazones-$pkgver-1-x86_64.pkg.tar.zst" + "kbuildsycoca.hook" + "plasmazones-refresh-sycoca" +) +sha256sums=( + 'f21bf6aa1ffa6f0d5d59ad3bd1f6a8b0b54227ce482446e502ff67c0a7cf4e29' + '8bd1b7fe1ca040f18fc0aa95f5da775cdbc1b090a23f63d8e16dd572cbba3c80' + 'f128058da53fd97e6a35718348fefa219b6352517bd13f6a1039368872cb0b6d' +) +install=plasmazones.install + +package() { + # Extract the prebuilt Arch package directly into $pkgdir + # The .pkg.tar.zst contains the filesystem layout ready to install + bsdtar -xf "$srcdir/$pkgname-$pkgver.pkg.tar.zst" -C "$pkgdir" + + # Remove pacman metadata (not needed when repackaging) + rm -rf "$pkgdir/.BUILDINFO" "$pkgdir/.MTREE" "$pkgdir/.PKGINFO" + + # Install pacman hook to auto-refresh sycoca cache + install -Dm644 "$srcdir/kbuildsycoca.hook" \ + "$pkgdir/usr/share/libalpm/hooks/plasmazones-kbuildsycoca.hook" + install -Dm755 "$srcdir/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 +}