bootstrap
Adom Hydrogen (macOS / Lima)
Public Made by Adomby adom
The macOS platform layer for Adom Hydrogen.
← Commit history
README.md+3−1@@ -37,7 +37,9 @@ so `core` stays generic across web + desktop Hydrogen and every host OS. - **postinstall:** deploys those skills into `~/.claude/skills/` on top of the generic layer, and installs the **`shot`** helper (`~/.local/bin/shot`) — one-call, token-efficient workspace screenshots that print only a PNG path (see- `hd-self-screenshot-mac`). Note `adom-wiki pkg install` does **not** re-run install+ `hd-self-screenshot-mac`) — plus the **Adom-branded Claude Code statusline**+ (`~/.claude/statusline.sh`: model + context bar + 5h usage; only set when the+ user hasn't configured their own). Note `adom-wiki pkg install` does **not** re-run install scripts for already-baked packages — HD's setup cascade (0.1.135+) runs the chain's deploy scripts explicitly (`core → hd-bootstrap → hd-mac-bootstrap`) so a fresh skills release actually reaches an already-baked machine.
package.json+1−1@@ -4,7 +4,7 @@ "type": "bootstrap", "title": "Hydrogen Desktop (macOS / Lima)", "brief": "The macOS platform layer for Hydrogen Desktop.",- "version": "0.1.5",+ "version": "0.1.6", "description": "The macOS platform layer for Hydrogen Desktop, where the workspace runs in a Lima Ubuntu VM hosting the Adom-Workspace systemd-nspawn machine. Depends on adom/hd-bootstrap (the platform-generic HD layer) and adds everything specific to the Lima/nspawn runtime: the container/networking/ports/setup/topology/volume/workspace-lifecycle hd-* skills (the macOS-runtime bucket), the in-machine workspace-updater daemon, and the macOS code-server workbench seed. Sibling layers adom/hd-windows-bootstrap (WSL2) and adom/hd-ubuntu-bootstrap depend on the same adom/hd-bootstrap. This is the package the golden Lima image installs.", "org": "adom", "tags": [
page.json+36−4@@ -3,8 +3,8 @@ "type": "bootstrap", "slug": "hd-mac-bootstrap", "title": "Hydrogen Desktop (macOS / Lima)",- "brief": "The macOS platform layer for Hydrogen Desktop \u2014 converges a Lima/nspawn workspace to the HD-on-Mac runtime.",- "version": "0.1.5",+ "brief": "The macOS platform layer for Hydrogen Desktop.",+ "version": "0.1.6", "license": "proprietary", "visibility": "public", "metadata": {@@ -16,7 +16,7 @@ "type": "image", "path": "screenshots/hero-v3.png" },- "discovery_pitch": "The macOS platform layer for Hydrogen Desktop \u2014 the Lima/nspawn workspace runtime plus every mac-specific hd-* skill.",+ "discovery_pitch": "The macOS platform layer for Hydrogen Desktop — the Lima/nspawn workspace runtime plus every mac-specific hd-* skill.", "discovery_triggers": [ "hydrogen desktop mac", "hd on macos",@@ -47,5 +47,37 @@ "label": "Workspace status", "prompt": "is my Lima workspace machine healthy" }- ]+ ],+ "description": "The macOS platform layer for Hydrogen Desktop, where the workspace runs in a Lima Ubuntu VM hosting the Adom-Workspace systemd-nspawn machine. Depends on adom/hd-bootstrap (the platform-generic HD layer) and adds everything specific to the Lima/nspawn runtime: the container/networking/ports/setup/topology/volume/workspace-lifecycle hd-* skills (the macOS-runtime bucket), the in-machine workspace-updater daemon, and the macOS code-server workbench seed. Sibling layers adom/hd-windows-bootstrap (WSL2) and adom/hd-ubuntu-bootstrap depend on the same adom/hd-bootstrap. This is the package the golden Lima image installs.",+ "org": "adom",+ "tags": [+ "bootstrap",+ "hydrogen-desktop",+ "hd",+ "macos",+ "mac",+ "lima",+ "nspawn"+ ],+ "needs_sudo": false,+ "scripts": {+ "postinstall": "./postinstall.sh"+ },+ "dependencies": {+ "adom/hd-bootstrap": "^0.2.0",+ "adom/adom-workspace-updater": "^0.1.0"+ },+ "files": [+ "postinstall.sh",+ "skills/**",+ "README.md",+ "SKILL.md",+ "page.json",+ "docs/**",+ "screenshots/**"+ ],+ "author": {+ "name": "Kyle Bergstedt",+ "email": "[email protected]"+ } }
postinstall.sh+84@@ -80,4 +80,88 @@ SHOT_EOF fi log "installed the 'shot' screenshot helper -> ~/.local/bin/shot" +# ── Claude Code statusline (Adom-branded) ────────────────────────────────────────────────────+# Model name + context-usage bar (teal/yellow/red) + 5h session % at the bottom of every+# Claude Code session in the workspace. Canonical copy: bin/statusline.sh in the page repo;+# embedded here because the pkg tarball ships no bin/ (same as shot). Non-clobbering merge:+# we only set settings.json's statusLine if the user hasn't configured one.+mkdir -p "$HOME/.claude"+if [ -f "$HERE/bin/statusline.sh" ]; then+ install -m 755 "$HERE/bin/statusline.sh" "$HOME/.claude/statusline.sh"+else+ cat > "$HOME/.claude/statusline.sh" <<'STATUSLINE_EOF'+#!/bin/sh+input=$(cat)+model=$(echo "$input" | sed -n 's/.*"display_name" *: *"\([^"]*\)".*/\1/p')+ctx=$(echo "$input" | grep -o '"used_percentage":[0-9.]*' | head -1 | grep -o '[0-9.]*')+session=$(echo "$input" | grep -o '"five_hour":{[^}]*' | grep -o '"used_percentage":[0-9.]*' | grep -o '[0-9.]*')++# Adom brand colors (truecolor)+C_TEAL=$(printf '\033[38;2;0;184;177m')+C_BLUE=$(printf '\033[38;2;100;171;255m')+C_PURPLE=$(printf '\033[38;2;140;107;247m')+C_RED=$(printf '\033[38;2;255;100;100m')+C_YELLOW=$(printf '\033[38;2;255;193;7m')+C_DIM=$(printf '\033[38;2;120;120;120m')+C_RESET=$(printf '\033[0m')++if [ -n "$model" ]; then+ printf "%s%s%s" "$C_PURPLE" "$model" "$C_RESET"+fi++if [ -n "$ctx" ]; then+ ctx_int=$(printf '%.0f' "$ctx")+ filled=$(( ctx_int / 5 ))+ empty=$(( 20 - filled ))++ if [ "$ctx_int" -ge 80 ]; then+ bar_color="$C_RED"+ elif [ "$ctx_int" -ge 50 ]; then+ bar_color="$C_YELLOW"+ else+ bar_color="$C_TEAL"+ fi++ bar=""+ i=0+ while [ $i -lt $filled ]; do+ bar="${bar}━"+ i=$(( i + 1 ))+ done+ i=0+ while [ $i -lt $empty ]; do+ bar="${bar}╌"+ i=$(( i + 1 ))+ done++ printf " %s[%s %s%%]%s" "$bar_color" "$bar" "$ctx_int" "$C_RESET"+fi++if [ -n "$session" ]; then+ session_int=$(printf '%.0f' "$session")+ if [ "$session_int" -ge 80 ]; then+ s_color="$C_RED"+ elif [ "$session_int" -ge 50 ]; then+ s_color="$C_YELLOW"+ else+ s_color="$C_BLUE"+ fi+ printf " %s%s %s%%%s" "$C_DIM" "5h:" "$s_color$session_int" "$C_RESET"+fi+STATUSLINE_EOF+ chmod 755 "$HOME/.claude/statusline.sh"+fi+# Merge statusLine into ~/.claude/settings.json ONLY if not already configured.+node -e '+const fs = require("fs"), p = process.env.HOME + "/.claude/settings.json";+let s = {}; try { s = JSON.parse(fs.readFileSync(p, "utf8")); } catch (e) {}+if (!s.statusLine) {+ s.statusLine = { type: "command", command: "~/.claude/statusline.sh" };+ fs.writeFileSync(p, JSON.stringify(s, null, 2));+ console.log("[hd-mac-bootstrap] statusLine set in settings.json");+} else {+ console.log("[hd-mac-bootstrap] statusLine already configured - left as-is");+}' 2>/dev/null || log "WARN: node unavailable - statusLine not merged into settings.json"+log "installed the Claude Code statusline -> ~/.claude/statusline.sh"+ log "macOS platform layer converged."