← Commit history

0.1.6: Adom-branded Claude Code statusline (auto-installed, non-clobbering)

Kyle Bergstedt ·dfe6079954 · ·parent 1567256
2 files changed +61−35
bin/statusline.shadded+58
@@ -0,0 +1,58 @@+#!/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
page.json+3−35
@@ -3,7 +3,7 @@   "type": "bootstrap",   "slug": "hd-mac-bootstrap",   "title": "Hydrogen Desktop (macOS / Lima)",-  "brief": "The macOS platform layer for Hydrogen Desktop.",+  "brief": "The macOS platform layer for Hydrogen Desktop \u2014 converges a Lima/nspawn workspace to the HD-on-Mac runtime.",   "version": "0.1.6",   "license": "proprietary",   "visibility": "public",@@ -16,7 +16,7 @@     "type": "image",     "path": "screenshots/hero-v3.png"   },-  "discovery_pitch": "The macOS platform layer for Hydrogen Desktop — the Lima/nspawn workspace runtime plus every mac-specific hd-* skill.",+  "discovery_pitch": "The macOS platform layer for Hydrogen Desktop \u2014 the Lima/nspawn workspace runtime plus every mac-specific hd-* skill.",   "discovery_triggers": [     "hydrogen desktop mac",     "hd on macos",@@ -47,37 +47,5 @@       "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]"-  }+  ] }\ No newline at end of file