mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-05-17 03:56:45 +00:00
GNOME 45+ extension that shows live token costs in the top bar panel with a dropdown for provider breakdown, top activities/models, cache stats, and budget alerts. Polls `codeburn status --format menubar-json` every 30s — same data contract as the macOS menubar app. Includes GSettings preferences (refresh interval, compact mode, budget threshold, per-provider enable/disable toggles) with Libadwaita UI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
38 lines
1.1 KiB
Bash
Executable file
38 lines
1.1 KiB
Bash
Executable file
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
UUID="codeburn@codeburn.dev"
|
|
INSTALL_DIR="${HOME}/.local/share/gnome-shell/extensions/${UUID}"
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
|
|
echo "Installing CodeBurn GNOME extension..."
|
|
|
|
# Compile GSettings schema
|
|
echo "Compiling schemas..."
|
|
glib-compile-schemas "${SCRIPT_DIR}/schemas/"
|
|
|
|
# Create install directory
|
|
mkdir -p "${INSTALL_DIR}"
|
|
|
|
# Copy extension files
|
|
cp "${SCRIPT_DIR}/metadata.json" "${INSTALL_DIR}/"
|
|
cp "${SCRIPT_DIR}/extension.js" "${INSTALL_DIR}/"
|
|
cp "${SCRIPT_DIR}/indicator.js" "${INSTALL_DIR}/"
|
|
cp "${SCRIPT_DIR}/dataClient.js" "${INSTALL_DIR}/"
|
|
cp "${SCRIPT_DIR}/prefs.js" "${INSTALL_DIR}/"
|
|
cp "${SCRIPT_DIR}/stylesheet.css" "${INSTALL_DIR}/"
|
|
|
|
# Copy schemas
|
|
mkdir -p "${INSTALL_DIR}/schemas"
|
|
cp "${SCRIPT_DIR}/schemas/"* "${INSTALL_DIR}/schemas/"
|
|
|
|
# Copy icons
|
|
mkdir -p "${INSTALL_DIR}/icons"
|
|
cp "${SCRIPT_DIR}/icons/"* "${INSTALL_DIR}/icons/"
|
|
|
|
echo "Extension installed to ${INSTALL_DIR}"
|
|
echo ""
|
|
echo "Next steps:"
|
|
echo " 1. Restart GNOME Shell (log out and back in on Wayland)"
|
|
echo " 2. Enable: gnome-extensions enable ${UUID}"
|
|
echo " 3. Configure: gnome-extensions prefs ${UUID}"
|