From f620e9ee6bebe0b025b67156c764d51db60e4a97 Mon Sep 17 00:00:00 2001 From: Jessyka_boat <158219213+Onefailatatime@users.noreply.github.com> Date: Fri, 4 Sep 2026 03:29:12 -0700 Subject: [PATCH] Add slap-notes-bin Local-first block notes with a wiki-link graph and a built-in AI research agent. Electron over a Next.js server, x86_64 only, repackaged from the vendor tarball with a Wayland launcher. Not in the AUR. The package follows its GitHub release feed through the declarative github upstream provider, reading each release's SHA256SUMS, with a 24h min_release_age quarantine. Co-Authored-By: Claude Opus 5 Co-Authored-By: Claude Fable 5.1 --- .../slap-notes-bin/.omarchy/package.json | 12 +++ pkgbuilds/slap-notes-bin/PKGBUILD | 82 +++++++++++++++++++ .../slap-notes-bin/slap-notes-bin.install | 3 + .../slap-notes-bin/slap-notes-launcher.sh | 32 ++++++++ 4 files changed, 129 insertions(+) create mode 100644 pkgbuilds/slap-notes-bin/.omarchy/package.json create mode 100644 pkgbuilds/slap-notes-bin/PKGBUILD create mode 100755 pkgbuilds/slap-notes-bin/slap-notes-bin.install create mode 100755 pkgbuilds/slap-notes-bin/slap-notes-launcher.sh diff --git a/pkgbuilds/slap-notes-bin/.omarchy/package.json b/pkgbuilds/slap-notes-bin/.omarchy/package.json new file mode 100644 index 0000000..a77bdb3 --- /dev/null +++ b/pkgbuilds/slap-notes-bin/.omarchy/package.json @@ -0,0 +1,12 @@ +{ + "source": "local", + "release_ring": "fast", + "min_release_age": "24h", + "upstream": { + "github": "Onefailatatime/slap-notes", + "checksums": "SHA256SUMS", + "assets": { + "x86_64": "slap-notes-{tag}-linux-x64.tar.zst" + } + } +} diff --git a/pkgbuilds/slap-notes-bin/PKGBUILD b/pkgbuilds/slap-notes-bin/PKGBUILD new file mode 100644 index 0000000..b19a7e7 --- /dev/null +++ b/pkgbuilds/slap-notes-bin/PKGBUILD @@ -0,0 +1,82 @@ +# Maintainer: FunnelFix + +# Slap Notes publishes a plain Electron tree rather than an AppImage, so this +# repackages the vendor tarball as-is. .omarchy/upstream.sh rewrites the version +# and checksum below from the release feed the app updates itself from. + +pkgname=slap-notes-bin +_appname=slap-notes +pkgver=0.2.3 +pkgrel=1 +pkgdesc="Local-first block notes with a wiki-link graph and a built-in AI research agent" +arch=('x86_64') +url="https://slapnotes.com" +license=('LicenseRef-proprietary') +depends=( + 'alsa-lib' + 'at-spi2-core' + 'cairo' + 'dbus' + 'expat' + 'gcc-libs' + 'glib2' + 'glibc' + 'gtk3' + 'hicolor-icon-theme' + 'libcups' + 'libdrm' + # Both are opened by name at runtime rather than linked, so nothing else in + # this list pulls them in: libnotify carries desktop notifications and + # libsecret backs Electron's encrypted storage. + 'libnotify' + 'libsecret' + 'libx11' + 'libxcb' + 'libxcomposite' + 'libxdamage' + 'libxext' + 'libxfixes' + 'libxkbcommon' + 'libxrandr' + 'mesa' + 'nspr' + 'nss' + 'pango' + 'systemd-libs' + 'xdg-utils' +) +provides=("${_appname}=${pkgver}") +conflicts=("${_appname}") +# Electron ships prebuilt binaries: stripping them breaks the bundle. +options=('!strip' '!debug') +install="${pkgname}.install" +_tarball="${_appname}-${pkgver}-linux-x64.tar.zst" +source=("${_appname}-launcher.sh") +source_x86_64=("${pkgname}-${pkgver}.tar.zst::https://github.com/Onefailatatime/slap-notes/releases/download/${pkgver}/${_tarball}") +sha256sums=('9d208c06717906b74c41874bdd3fdba0f0dc5b31d239ae00d19472e6eab2ea29') +sha256sums_x86_64=('56cb7606f41051ba10d088ed8e1ae85a17b20692f4b45c0c6a6e6cec6669a5e2') + +package() { + cd "${srcdir}/${_appname}-${pkgver}" + + install -dm755 "${pkgdir}/opt/${_appname}" + cp -a app/. "${pkgdir}/opt/${_appname}/" + chmod -R a+rX "${pkgdir}/opt/${_appname}" + + install -Dm755 "${srcdir}/${_appname}-launcher.sh" "${pkgdir}/usr/bin/${_appname}" + + # Upstream's entry points straight into /opt, which would step around the + # launcher and hand every desktop-started window to XWayland. + sed -e "s|^Exec=.*|Exec=${_appname} %U|" "${_appname}.desktop" \ + > "${srcdir}/${_appname}.desktop.arch" + install -Dm644 "${srcdir}/${_appname}.desktop.arch" \ + "${pkgdir}/usr/share/applications/${_appname}.desktop" + + local size + for size in 16 32 48 64 128 256 512 1024; do + install -Dm644 "icons/${size}.png" \ + "${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/${_appname}.png" + done + + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} diff --git a/pkgbuilds/slap-notes-bin/slap-notes-bin.install b/pkgbuilds/slap-notes-bin/slap-notes-bin.install new file mode 100755 index 0000000..77fb3b2 --- /dev/null +++ b/pkgbuilds/slap-notes-bin/slap-notes-bin.install @@ -0,0 +1,3 @@ +post_install() { + echo "Extra Chromium flags go in ~/.config/slap-notes-flags.conf, one per line." +} diff --git a/pkgbuilds/slap-notes-bin/slap-notes-launcher.sh b/pkgbuilds/slap-notes-bin/slap-notes-launcher.sh new file mode 100755 index 0000000..ade5c08 --- /dev/null +++ b/pkgbuilds/slap-notes-bin/slap-notes-launcher.sh @@ -0,0 +1,32 @@ +#!/bin/bash +set -euo pipefail + +user_flags=() +config_home="${XDG_CONFIG_HOME:-}" +[[ -n "$config_home" || -z "${HOME:-}" ]] || config_home="$HOME/.config" +flags_file="${config_home:+$config_home/slap-notes-flags.conf}" + +if [[ -n "$flags_file" && -f "$flags_file" && -r "$flags_file" ]]; then + while IFS= read -r line || [[ -n "$line" ]]; do + line="${line%%#*}" + [[ -n "${line//[[:space:]]/}" ]] || continue + read -r -a flags <<<"$line" + user_flags+=("${flags[@]}") + done <"$flags_file" +fi + +# Chromium's own Ozone detection falls back to XWayland often enough to matter, +# and the result is a blurry window on every scaled display. Ask for Wayland +# directly, unless the user has already picked a platform themselves. +platform_flags=() +if [[ -n "${WAYLAND_DISPLAY:-}" || "${XDG_SESSION_TYPE:-}" == wayland ]]; then + platform_flags=(--ozone-platform=wayland) + + for flag in "${user_flags[@]}" "$@"; do + case "$flag" in + --ozone-platform=* | --ozone-platform-hint=*) platform_flags=() ;; + esac + done +fi + +exec /opt/slap-notes/slap-notes "${platform_flags[@]}" "${user_flags[@]}" "$@"