ops: paivana and caddy config refresh

This commit is contained in:
Hernâni Marques 2026-09-09 00:52:54 +02:00
parent d8dbc6242b
commit 56f814a6de
No known key found for this signature in database
74 changed files with 4517 additions and 79 deletions

View file

@ -0,0 +1,23 @@
# SilverBullet — system Notes apps (hosts)
Goal: **like Apple Notes** — a real system app window on each laptop, not a browser bookmark and not SilverBullet plugs.
| Host | App | Behavior |
|------|-----|----------|
| magikoopa | `SilverBullet.app``~/Applications/` | Brave/Chrome **`--app=`** + own profile (`SilverBullet-BraveProfile`) — no tab bar |
| clementine | `silverbullet.desktop` | same `--app=` via Brave/Chromium + `~/.local/share/SilverBullet-browser` |
| both (optional) | Browser **Install app** / PWA | even closer to native Dock/menu identity |
**Not this:** `space/_plug/` (TreeView/SilverSearch) — those are in-editor extensions.
Install:
```bash
# magikoopa
bash configs/notes/client-apps/install-magikoopa.sh
# clementine (on-box)
bash configs/notes/client-apps/install-clementine.sh
```
First launch: log in once (Caddy basicauth); credentials stay in the app profile.

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key><string>SilverBullet</string>
<key>CFBundleDisplayName</key><string>SilverBullet</string>
<key>CFBundleIdentifier</key><string>ch.hacktivism.silverbullet</string>
<key>CFBundleVersion</key><string>1</string>
<key>CFBundleShortVersionString</key><string>1.0</string>
<key>CFBundleExecutable</key><string>SilverBullet</string>
<key>CFBundlePackageType</key><string>APPL</string>
<key>LSMinimumSystemVersion</key><string>12.0</string>
<key>CFBundleIconFile</key><string>AppIcon</string>
</dict>
</plist>

View file

@ -0,0 +1,31 @@
#!/bin/bash
# SilverBullet — Notes-like system app (standalone window, not a browser tab)
URL="https://silverbullet.hacktivism.ch/"
USER_DATA="${HOME}/Library/Application Support/SilverBullet-BraveProfile"
mkdir -p "$USER_DATA"
BRAVE="/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"
CHROME="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
# Dedicated Chromium profile so this feels like its own app (Dock, cookies, no tab chrome)
if [[ -x "$BRAVE" ]]; then
exec "$BRAVE" \
--user-data-dir="$USER_DATA" \
--class=SilverBullet \
--app="$URL" \
--name=SilverBullet
elif [[ -x "$CHROME" ]]; then
exec "$CHROME" \
--user-data-dir="$USER_DATA" \
--class=SilverBullet \
--app="$URL" \
--name=SilverBullet
else
# last resort: Safari has no --app; open dedicated window via osascript
exec osascript <<'OSA'
tell application "Safari"
activate
make new document with properties {URL:"https://silverbullet.hacktivism.ch/"}
end tell
OSA
fi

View file

@ -0,0 +1,13 @@
#!/usr/bin/env bash
# Install SilverBullet XFCE launcher on clementine (on-box). No Freigabe (user home).
set -euo pipefail
SRC="$(cd "$(dirname "$0")" && pwd)/silverbullet.desktop"
APPDIR="${HOME}/.local/share/applications"
DESK="${HOME}/Desktop"
mkdir -p "$APPDIR" "$DESK"
install -m 0644 "$SRC" "$APPDIR/silverbullet.desktop"
install -m 0644 "$SRC" "$DESK/silverbullet.desktop"
# refresh menu cache if available
command -v update-desktop-database >/dev/null && update-desktop-database "$APPDIR" || true
echo "STATUS=ok DESKTOP=$APPDIR/silverbullet.desktop SHORTCUT=$DESK/silverbullet.desktop"
echo "TIP=open https://silverbullet.hacktivism.ch then browser Install app for PWA"

View file

@ -0,0 +1,34 @@
#!/usr/bin/env bash
# Install SilverBullet.app into ~/Applications (magikoopa). No Freigabe (user home).
set -euo pipefail
SRC="$(cd "$(dirname "$0")" && pwd)/SilverBullet.app"
DEST="${HOME}/Applications/SilverBullet.app"
URL="${HOME}/Desktop/SilverBullet.url"
mkdir -p "${HOME}/Applications" "${HOME}/Desktop"
if [[ -d "$SRC" ]]; then
rm -rf "$DEST"
cp -R "$SRC" "$DEST"
else
# bootstrap minimal app if scaffold app tree missing
mkdir -p "$DEST/Contents/MacOS" "$DEST/Contents/Resources"
cat >"$DEST/Contents/Info.plist" <<'PLIST'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key><string>SilverBullet</string>
<key>CFBundleDisplayName</key><string>SilverBullet</string>
<key>CFBundleIdentifier</key><string>ch.hacktivism.silverbullet</string>
<key>CFBundleVersion</key><string>1</string>
<key>CFBundleShortVersionString</key><string>1.0</string>
<key>CFBundleExecutable</key><string>SilverBullet</string>
<key>CFBundlePackageType</key><string>APPL</string>
<key>LSMinimumSystemVersion</key><string>12.0</string>
</dict>
</plist>
PLIST
printf '%s\n' '#!/bin/bash' 'open "https://silverbullet.hacktivism.ch/"' >"$DEST/Contents/MacOS/SilverBullet"
chmod +x "$DEST/Contents/MacOS/SilverBullet"
fi
printf '%s\n' '[InternetShortcut]' 'URL=https://silverbullet.hacktivism.ch/' >"$URL"
echo "STATUS=ok APP=$DEST URL=$URL"

View file

@ -0,0 +1,12 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=SilverBullet
Comment=Notes-like SilverBullet on koopa standalone window
TryExec=brave-browser
Exec=sh -c 'B=""; for c in brave-browser brave chromium chromium-browser google-chrome; do command -v "$c" >/dev/null && B="$c" && break; done; if [ -n "$B" ]; then exec "$B" --user-data-dir="$HOME/.local/share/SilverBullet-browser" --class=SilverBullet --app=https://silverbullet.hacktivism.ch/; else exec xdg-open https://silverbullet.hacktivism.ch/; fi'
Terminal=false
Categories=Office;Network;
Keywords=notes;todo;silverbullet;
StartupWMClass=SilverBullet
StartupNotify=true