Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
feat(shell): add Ghostty terminal themes, shaders, and shell integration
Adam Eivyfdb21128d985
diff --git a/.changelog/v0.14.x.md b/.changelog/v0.14.x.mdnew file mode 100644index 0000000000..954057c8d1--- /dev/null+++ b/.changelog/v0.14.x.md@@ -0,0 +1,21 @@+# Release v0.14.x - Changelog++Released: YYYY-MM-DD++## Overview++This release adds Ghostty terminal theme integration and a project update workflow.++## Features++### Ghostty Shell Integration+- **6 custom terminal themes** (blue, green, purple, orange, red, cyan) with matching GLSL shaders — each theme has a distinct color palette and animated background effect (nebula, matrix rain, forge sparks, etc.)+- **`proj` launcher function** — open any project directory in a themed Ghostty window with `proj <path> [theme]`; auto-detects `.ghostty-theme` files for per-project theming+- **Auto-theme on `cd`** — OSC escape sequences dynamically recolor the terminal when entering/leaving directories with `.ghostty-theme` files (chpwd hook)+- **`proj-themes` listing** — shows all available themes with emoji indicators and descriptions+- **`setup-ghostty.js` installer** — copies shaders + themes to Ghostty config dirs, clones community shader repo, adds shell source line to `~/.zshrc` (all idempotent)+- **Opt-in during `setup.sh`** — first-time setup prompts for Ghostty integration; safe to skip if Ghostty isn't installed++### Update Script+- **`update.sh`** — one-command post-pull updater that refreshes dependencies, ensures data/browser setup, and re-syncs Ghostty shaders/themes+- **`npm run update`** — npm script equivalent for the same workflowdiff --git a/package.json b/package.jsonindex a0a0f4bbfb..d27dac9769 100644--- a/package.json+++ b/package.json@@ -27,6 +27,8 @@"setup": "node scripts/setup-data.js && node scripts/setup-browser.js","setup:data": "node scripts/setup-data.js","setup:browser": "node scripts/setup-browser.js",+ "setup:ghostty": "node scripts/setup-ghostty.js",+ "update": "npm install && cd client && npm install && cd ../server && npm install && cd .. && npm run setup && npm run setup:ghostty","test": "cd server && npm test"},"devDependencies": {diff --git a/scripts/setup-ghostty.js b/scripts/setup-ghostty.jsnew file mode 100644index 0000000000..a1d7d1c198--- /dev/null+++ b/scripts/setup-ghostty.js@@ -0,0 +1,94 @@+#!/usr/bin/env node+import { existsSync, mkdirSync, cpSync, readFileSync, appendFileSync, readdirSync } from 'fs';+import { dirname, join } from 'path';+import { fileURLToPath } from 'url';+import { execSync } from 'child_process';+import { homedir, platform } from 'os';++const __dirname = dirname(fileURLToPath(import.meta.url));+const rootDir = join(__dirname, '..');+const home = homedir();+const isMac = platform() === 'darwin';++// Check if Ghostty is installed+const ghosttyInstalled = (() => {+ const paths = [+ '/Applications/Ghostty.app',+ join(home, 'Applications/Ghostty.app'),+ join(home, 'Documents/Ghostty.app'),+ ];+ if (paths.some(p => existsSync(p))) return true;+ try {+ execSync('command -v ghostty', { stdio: 'ignore' });+ return true;+ } catch {+ return false;+ }+})();++if (!ghosttyInstalled) {+ console.log('👻 Ghostty not detected — skipping shell integration setup');+ process.exit(0);+}++console.log('👻 Setting up Ghostty shell integration...');++// 1. Copy shaders → ~/.config/ghostty/shaders/+const shaderSrc = join(rootDir, 'shell/shaders');+const shaderDest = join(home, '.config/ghostty/shaders');+mkdirSync(shaderDest, { recursive: true });++const shaderFiles = readdirSync(shaderSrc).filter(f => f.endsWith('.glsl'));+for (const file of shaderFiles) {+ cpSync(join(shaderSrc, file), join(shaderDest, file));+}+console.log(`✅ Copied ${shaderFiles.length} shaders → ${shaderDest}`);++// 2. Copy themes → platform-specific themes directory+const themeSrc = join(rootDir, 'shell/themes');+const themeDest = isMac+ ? join(home, 'Library/Application Support/com.mitchellh.ghostty/themes')+ : join(home, '.config/ghostty/themes');+mkdirSync(themeDest, { recursive: true });++const themeFiles = readdirSync(themeSrc).filter(f => f.endsWith('.conf'));+for (const file of themeFiles) {+ cpSync(join(themeSrc, file), join(themeDest, file));+}+console.log(`✅ Copied ${themeFiles.length} themes → ${themeDest}`);++// 3. Clone community shaders if not present+const communityDir = join(shaderDest, 'community');+if (!existsSync(communityDir)) {+ console.log('📦 Cloning community shaders...');+ try {+ execSync(`git clone https://github.com/0xhckr/ghostty-shaders "${communityDir}"`, {+ stdio: 'inherit',+ });+ console.log('✅ Community shaders cloned');+ } catch {+ console.log('⚠️ Could not clone community shaders (no git or network?) — skipping');+ }+} else {+ console.log('✅ Community shaders already present');+}++// 4. Add source line to shell rc file+const shellRcPath = existsSync(join(home, '.zshrc'))+ ? join(home, '.zshrc')+ : join(home, '.bashrc');++const sourceLine = `source "${join(rootDir, 'shell/ghostty.sh')}"`;+const rcContent = existsSync(shellRcPath) ? readFileSync(shellRcPath, 'utf8') : '';++if (rcContent.includes(sourceLine)) {+ console.log(`✅ Shell integration already in ${shellRcPath}`);+} else {+ appendFileSync(shellRcPath, `\n# PortOS Ghostty shell integration\n${sourceLine}\n`);+ console.log(`✅ Added source line to ${shellRcPath}`);+}++console.log('');+console.log('👻 Ghostty setup complete!');+console.log(' Restart your shell or run: source ~/.zshrc');+console.log(' Try: proj . blue');diff --git a/setup.sh b/setup.shindex ccff0c1517..fb52883cb1 100755--- a/setup.sh+++ b/setup.sh@@ -28,6 +28,14 @@ echo ""echo "Setting up data directory..."npm run setup+echo ""++# Optional Ghostty setup+read -p "Set up Ghostty terminal themes? (y/N): " setup_ghostty+if [[ $setup_ghostty =~ ^[Yy]$ ]]; then+ node scripts/setup-ghostty.js+fi+echo ""echo "==================================="echo " Setup Complete!"diff --git a/shell/ghostty.sh b/shell/ghostty.shnew file mode 100755index 0000000000..c630053ac3--- /dev/null+++ b/shell/ghostty.sh@@ -0,0 +1,235 @@+#!/bin/zsh+#########################################+# Ghostty Shell Integration for PortOS+# Source this file from ~/.zshrc to enable:+# - proj <path> [theme] — launch Ghostty with project theme+# - proj-themes — list available themes+# - Auto-theme on cd — OSC color changes when entering themed dirs+#########################################++# Find ghostty binary (shared helper)+function _ghostty_bin() {+ if command -v ghostty &>/dev/null; then+ echo "ghostty"+ elif [[ -x "/Applications/Ghostty.app/Contents/MacOS/ghostty" ]]; then+ echo "/Applications/Ghostty.app/Contents/MacOS/ghostty"+ elif [[ -x "$HOME/Applications/Ghostty.app/Contents/MacOS/ghostty" ]]; then+ echo "$HOME/Applications/Ghostty.app/Contents/MacOS/ghostty"+ elif [[ -x "$HOME/Documents/Ghostty.app/Contents/MacOS/ghostty" ]]; then+ echo "$HOME/Documents/Ghostty.app/Contents/MacOS/ghostty"+ fi+}++# Map theme name to emoji+function _ghostty_theme_emoji() {+ case "$1" in+ blue) echo "🔵" ;;+ green) echo "🟢" ;;+ purple) echo "🟣" ;;+ orange) echo "🟠" ;;+ red) echo "🔴" ;;+ cyan) echo "🩵" ;;+ *) echo "⚪" ;;+ esac+}++# Detect theme name from a .ghostty-theme file (reads the comment header)+function _ghostty_theme_name() {+ local file="$1"+ local first_line+ first_line=$(head -1 "$file" 2>/dev/null)+ if [[ "$first_line" =~ ^#.*-\ (.+)\ theme$ ]]; then+ echo "${match[1]:l}" # lowercase+ elif [[ "$first_line" =~ ^#.*-\ (.+)$ ]]; then+ # Try to extract color keyword from comment+ local comment="${first_line#\# }"+ for color in blue green purple orange red cyan; do+ if [[ "${comment:l}" == *"$color"* ]]; then+ echo "$color"+ return+ fi+ done+ echo "custom"+ else+ echo "custom"+ fi+}++#########################################+# Ghostty Project Launcher+# Usage: proj <project-path> [theme]+# Themes: blue, green, purple, orange, red, cyan+#+# Theme resolution order:+# 1. .ghostty-theme file in the project directory+# 2. Named theme passed as second argument+# 3. Default: blue+#+# Examples:+# proj ~/projects/my-api # uses .ghostty-theme if present, else blue+# proj ~/projects/frontend purple # uses purple theme (ignores .ghostty-theme)+# proj . # open current dir++function proj() {+ local project_path="${1:-.}"+ local theme_override="$2"+ local theme_dir="$HOME/Library/Application Support/com.mitchellh.ghostty/themes"++ # Resolve to absolute path+ if [[ "$project_path" == "." ]]; then+ project_path="$(pwd)"+ else+ project_path="$(cd "$project_path" 2>/dev/null && pwd)"+ fi++ if [[ -z "$project_path" || ! -d "$project_path" ]]; then+ echo "Error: Directory not found: $1"+ return 1+ fi++ local ghostty_bin+ ghostty_bin="$(_ghostty_bin)"+ if [[ -z "$ghostty_bin" ]]; then+ echo "Error: Ghostty not found"+ return 1+ fi++ local theme_file=""+ local theme_name=""++ # Theme resolution: explicit arg > .ghostty-theme > default+ if [[ -n "$theme_override" ]]; then+ theme_file="$theme_dir/$theme_override.conf"+ theme_name="$theme_override"+ if [[ ! -f "$theme_file" ]]; then+ echo "Available themes: blue, green, purple, orange, red, cyan"+ echo "Error: Theme not found: $theme_override"+ return 1+ fi+ elif [[ -f "$project_path/.ghostty-theme" ]]; then+ theme_file="$project_path/.ghostty-theme"+ theme_name="$(_ghostty_theme_name "$theme_file")"+ else+ theme_name="blue"+ theme_file="$theme_dir/blue.conf"+ fi++ local project_name=$(basename "$project_path")+ local emoji="$(_ghostty_theme_emoji "$theme_name")"+ local window_title="${emoji} ${project_name}"++ "$ghostty_bin" \+ --config-file="$theme_file" \+ --title="$window_title" \+ --working-directory="$project_path" &++ disown+ echo "Launched: $window_title"+}++# List available Ghostty themes+function proj-themes() {+ echo "Available Ghostty project themes:"+ echo " blue 🔵 Default/main projects"+ echo " green 🟢 Backend/API projects"+ echo " purple 🟣 Frontend/UI projects"+ echo " orange 🟠 DevOps/Infrastructure"+ echo " red 🔴 Production/Critical"+ echo " cyan 🩵 Data/Analytics"+ echo ""+ echo "Or drop a .ghostty-theme file in any project directory."+ echo ""+ echo "Usage: proj <project-path> [theme]"+ echo "Example: proj ~/projects/my-api green"+ echo "Example: proj ~/projects/PortOS # auto-detects .ghostty-theme"+}++#########################################+# Ghostty auto-theme on cd+# Walks up from cwd to find nearest .ghostty-theme and applies colors+# via OSC escape sequences. Reverts to defaults when leaving a themed dir.++GHOSTTY_THEME_ACTIVE=""++function _ghostty_apply_osc() {+ # Only run inside Ghostty+ [[ "$TERM_PROGRAM" == "ghostty" ]] || return 0++ local theme_file=""+ local search_dir="$PWD"++ # Walk up to find nearest .ghostty-theme+ while [[ "$search_dir" != "/" ]]; do+ if [[ -f "$search_dir/.ghostty-theme" ]]; then+ theme_file="$search_dir/.ghostty-theme"+ break+ fi+ search_dir="$(dirname "$search_dir")"+ done++ # Same theme already active — skip+ if [[ "$theme_file" == "$GHOSTTY_THEME_ACTIVE" ]]; then+ return 0+ fi++ if [[ -n "$theme_file" ]]; then+ GHOSTTY_THEME_ACTIVE="$theme_file"+ _ghostty_set_colors "$theme_file"+ elif [[ -n "$GHOSTTY_THEME_ACTIVE" ]]; then+ # Left a themed directory — reset to defaults+ GHOSTTY_THEME_ACTIVE=""+ _ghostty_reset_colors+ fi+}++function _ghostty_set_colors() {+ local file="$1"+ while IFS= read -r line; do+ # Skip comments and empty lines+ [[ "$line" =~ ^[[:space:]]*# ]] && continue+ [[ -z "${line// /}" ]] && continue++ local key="${line%%=*}"+ local val="${line#*= }"+ key="${key// /}"+ val="${val// /}"++ case "$key" in+ foreground)+ [[ "$val" != \#* ]] && val="#$val"+ printf '\e]10;%s\a' "$val"+ ;;+ background)+ [[ "$val" != \#* ]] && val="#$val"+ printf '\e]11;%s\a' "$val"+ ;;+ cursor-color)+ [[ "$val" != \#* ]] && val="#$val"+ printf '\e]12;%s\a' "$val"+ ;;+ palette)+ # val format: "N=#RRGGBB" e.g. "0=#0f0f0f"+ local idx="${val%%=*}"+ local color="${val#*=}"+ [[ "$color" != \#* ]] && color="#$color"+ printf '\e]4;%s;%s\a' "$idx" "$color"+ ;;+ esac+ done < "$file"+}++function _ghostty_reset_colors() {+ # Reset foreground, background, cursor to terminal defaults+ printf '\e]110\a' # reset foreground+ printf '\e]111\a' # reset background+ printf '\e]112\a' # reset cursor+ # Reset all 16 palette colors+ printf '\e]104\a' # reset all palette entries+}++# Register the chpwd hook+autoload -U add-zsh-hook+add-zsh-hook chpwd _ghostty_apply_osc++# Apply on shell startup too (in case shell starts in a themed directory)+_ghostty_apply_oscdiff --git a/shell/shaders/blue-glow.glsl b/shell/shaders/blue-glow.glslnew file mode 100644index 0000000000..d418c49ce4--- /dev/null+++ b/shell/shaders/blue-glow.glsl@@ -0,0 +1,31 @@+// Blue glow - soft bloom around text with drifting blue nebula in background+void mainImage(out vec4 fragColor, in vec2 fragCoord) {+ vec2 uv = fragCoord.xy / iResolution.xy;+ vec4 term = texture(iChannel0, uv);++ // Bloom: sample neighbors and add glow+ vec2 px = vec2(1.0) / iResolution.xy;+ vec4 bloom = vec4(0.0);+ for (int x = -2; x <= 2; x++) {+ for (int y = -2; y <= 2; y++) {+ vec4 s = texture(iChannel0, uv + vec2(float(x), float(y)) * px * 1.5);+ float l = dot(s.rgb, vec3(0.2126, 0.7152, 0.0722));+ if (l > 0.15) bloom += s * 0.04;+ }+ }++ // Slow-drifting blue nebula in background areas+ float t = iTime * 0.08;+ vec2 p = uv * 3.0 + vec2(t, t * 0.7);+ float n = sin(p.x * 1.7 + sin(p.y * 2.3 + t)) *+ cos(p.y * 1.9 + sin(p.x * 1.3 - t * 0.5));+ n = n * 0.5 + 0.5;+ vec3 nebula = vec3(0.05, 0.12, 0.25) * n * 0.4;++ // Mask: only show nebula where terminal is dark+ float lum = dot(term.rgb, vec3(0.2126, 0.7152, 0.0722));+ float mask = smoothstep(0.05, 0.15, lum);++ vec3 color = mix(nebula, term.rgb, mask) + bloom.rgb * vec3(0.4, 0.6, 1.0);+ fragColor = vec4(color, term.a);+}diff --git a/shell/shaders/cyan-data.glsl b/shell/shaders/cyan-data.glslnew file mode 100644index 0000000000..83b87912e9--- /dev/null+++ b/shell/shaders/cyan-data.glsl@@ -0,0 +1,45 @@+// Cyan data - flowing data streams with grid pattern+float hash(vec2 p) {+ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);+}++void mainImage(out vec4 fragColor, in vec2 fragCoord) {+ vec2 uv = fragCoord.xy / iResolution.xy;+ vec4 term = texture(iChannel0, uv);++ float t = iTime * 0.05;++ // Subtle grid overlay+ vec2 grid = fract(uv * vec2(30.0, 20.0));+ float gridLine = step(0.96, grid.x) + step(0.96, grid.y);+ vec3 gridColor = vec3(0.0, 0.15, 0.15) * gridLine * 0.15;++ // Horizontal data streams+ float streams = 0.0;+ for (float i = 0.0; i < 6.0; i++) {+ float y = hash(vec2(i, 0.0));+ float speed = 0.1 + hash(vec2(i, 1.0)) * 0.15;+ float x = fract(iTime * speed + hash(vec2(i, 2.0)));+ float width = 0.003 + hash(vec2(i, 3.0)) * 0.005;++ float dy = abs(uv.y - y);+ float dx = uv.x - x;+ if (dy < width && dx > -0.2 && dx < 0.0) {+ float brightness = (1.0 + dx / 0.2) * (1.0 - dy / width);+ streams += brightness * 0.15;+ }+ }++ // Soft cyan ambient+ float ambient = sin(uv.x * 3.0 + t) * sin(uv.y * 2.0 - t * 0.6) * 0.5 + 0.5;+ vec3 ambientColor = vec3(0.02, 0.08, 0.08) * ambient * 0.3;++ // Mask+ float lum = dot(term.rgb, vec3(0.2126, 0.7152, 0.0722));+ float mask = smoothstep(0.05, 0.15, lum);++ vec3 streamColor = vec3(0.2, 1.0, 0.9) * streams;+ vec3 bg = ambientColor + gridColor + streamColor;+ vec3 color = mix(bg, term.rgb, mask);+ fragColor = vec4(color, term.a);+}diff --git a/shell/shaders/green-rain.glsl b/shell/shaders/green-rain.glslnew file mode 100644index 0000000000..984914c5d8--- /dev/null+++ b/shell/shaders/green-rain.glsl@@ -0,0 +1,42 @@+// Green rain - gentle matrix-like falling particles+float hash(vec2 p) {+ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);+}++void mainImage(out vec4 fragColor, in vec2 fragCoord) {+ vec2 uv = fragCoord.xy / iResolution.xy;+ vec4 term = texture(iChannel0, uv);++ // Grid of falling streaks+ float drops = 0.0;+ float cols = 40.0;+ for (float i = 0.0; i < cols; i++) {+ float x = (i + 0.5) / cols;+ float speed = 0.02 + hash(vec2(i, 0.0)) * 0.04;+ float phase = hash(vec2(i, 1.0));+ float y = fract(-iTime * speed + phase);++ // Streak with tail+ float dx = abs(uv.x - x) * cols;+ float dy = uv.y - y;+ if (dy > 0.0 && dy < 0.15 && dx < 0.5) {+ float brightness = (1.0 - dy / 0.15) * (1.0 - dx * 2.0);+ drops += brightness * 0.08;+ }+ }++ // Subtle green fog+ float t = iTime * 0.05;+ float fog = sin(uv.x * 4.0 + t) * cos(uv.y * 3.0 - t * 0.7) * 0.5 + 0.5;+ vec3 fogColor = vec3(0.02, 0.08, 0.03) * fog * 0.3;++ // Mask: only in background areas+ float lum = dot(term.rgb, vec3(0.2126, 0.7152, 0.0722));+ float mask = smoothstep(0.05, 0.15, lum);++ vec3 rain = vec3(0.1, 0.9, 0.3) * drops;+ vec3 bg = fogColor + rain;++ vec3 color = mix(bg, term.rgb, mask);+ fragColor = vec4(color, term.a);+}diff --git a/shell/shaders/orange-forge.glsl b/shell/shaders/orange-forge.glslnew file mode 100644index 0000000000..9af583d72c--- /dev/null+++ b/shell/shaders/orange-forge.glsl@@ -0,0 +1,42 @@+// Orange forge - warm heat distortion with floating sparks+float hash(vec2 p) {+ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);+}++void mainImage(out vec4 fragColor, in vec2 fragCoord) {+ vec2 uv = fragCoord.xy / iResolution.xy;+ vec4 term = texture(iChannel0, uv);++ float t = iTime * 0.06;++ // Warm undulating heat+ float heat = sin(uv.x * 5.0 + t * 2.0) * cos(uv.y * 4.0 - t) * 0.5 + 0.5;+ heat *= sin(uv.y * 8.0 + t * 1.5) * 0.5 + 0.5;+ vec3 heatColor = mix(+ vec3(0.12, 0.06, 0.01),+ vec3(0.2, 0.1, 0.02),+ heat+ ) * 0.4;++ // Rising sparks+ float sparks = 0.0;+ for (float i = 0.0; i < 10.0; i++) {+ float x = hash(vec2(i, 0.0));+ float speed = 0.015 + hash(vec2(i, 1.0)) * 0.03;+ float y = fract(-iTime * speed + hash(vec2(i, 2.0)));+ float wobble = sin(iTime * 2.0 + i * 3.0) * 0.01;+ vec2 pos = vec2(x + wobble, y);+ float d = length((uv - pos) * vec2(iResolution.x / iResolution.y, 1.0));+ float life = y; // fade as they rise+ sparks += (0.0004 / (d * d + 0.0003)) * life;+ }++ // Mask+ float lum = dot(term.rgb, vec3(0.2126, 0.7152, 0.0722));+ float mask = smoothstep(0.05, 0.15, lum);++ vec3 sparkColor = vec3(1.0, 0.6, 0.15) * sparks * 0.4;+ vec3 bg = heatColor + sparkColor;+ vec3 color = mix(bg, term.rgb, mask);+ fragColor = vec4(color, term.a);+}diff --git a/shell/shaders/purple-nebula.glsl b/shell/shaders/purple-nebula.glslnew file mode 100644index 0000000000..469586684d--- /dev/null+++ b/shell/shaders/purple-nebula.glsl@@ -0,0 +1,61 @@+// Purple nebula - drifting cosmic fog with twinkling stars+float hash(vec2 p) {+ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);+}++float noise(vec2 p) {+ vec2 i = floor(p);+ vec2 f = fract(p);+ f = f * f * (3.0 - 2.0 * f);+ float a = hash(i);+ float b = hash(i + vec2(1.0, 0.0));+ float c = hash(i + vec2(0.0, 1.0));+ float d = hash(i + vec2(1.0, 1.0));+ return mix(mix(a, b, f.x), mix(c, d, f.x), f.y);+}++float fbm(vec2 p) {+ float v = 0.0;+ float a = 0.5;+ for (int i = 0; i < 4; i++) {+ v += a * noise(p);+ p *= 2.0;+ a *= 0.5;+ }+ return v;+}++void mainImage(out vec4 fragColor, in vec2 fragCoord) {+ vec2 uv = fragCoord.xy / iResolution.xy;+ vec4 term = texture(iChannel0, uv);++ float t = iTime * 0.04;++ // Layered nebula+ float n1 = fbm(uv * 3.0 + vec2(t, t * 0.7));+ float n2 = fbm(uv * 5.0 - vec2(t * 0.5, t * 0.3));+ float nebula = n1 * 0.6 + n2 * 0.4;++ vec3 nebulaColor = mix(+ vec3(0.08, 0.02, 0.15), // deep purple+ vec3(0.15, 0.05, 0.25), // lighter purple+ nebula+ ) * 0.5;++ // Sparse twinkling stars+ float stars = 0.0;+ for (float i = 0.0; i < 12.0; i++) {+ vec2 pos = vec2(hash(vec2(i, 3.0)), hash(vec2(i, 7.0)));+ float d = length((uv - pos) * vec2(iResolution.x / iResolution.y, 1.0));+ float twinkle = sin(iTime * (1.0 + hash(vec2(i, 5.0)) * 2.0) + i) * 0.5 + 0.5;+ stars += (0.0003 / (d * d + 0.0005)) * twinkle;+ }++ // Mask: only in background areas+ float lum = dot(term.rgb, vec3(0.2126, 0.7152, 0.0722));+ float mask = smoothstep(0.05, 0.15, lum);++ vec3 bg = nebulaColor + vec3(0.7, 0.5, 1.0) * stars * 0.3;+ vec3 color = mix(bg, term.rgb, mask);+ fragColor = vec4(color, term.a);+}diff --git a/shell/shaders/red-pulse.glsl b/shell/shaders/red-pulse.glslnew file mode 100644index 0000000000..e729eb9e79--- /dev/null+++ b/shell/shaders/red-pulse.glsl@@ -0,0 +1,39 @@+// Red pulse - heartbeat vignette with subtle ember particles+float hash(vec2 p) {+ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);+}++void mainImage(out vec4 fragColor, in vec2 fragCoord) {+ vec2 uv = fragCoord.xy / iResolution.xy;+ vec4 term = texture(iChannel0, uv);++ // Heartbeat pulse - slow double-beat+ float t = iTime * 1.2;+ float beat = pow(sin(t) * 0.5 + 0.5, 8.0) ++ pow(sin(t + 0.3) * 0.5 + 0.5, 12.0) * 0.5;+ beat *= 0.15;++ // Vignette centered glow+ vec2 center = uv - 0.5;+ float vignette = 1.0 - dot(center, center) * 1.5;+ vignette = clamp(vignette, 0.0, 1.0);++ // Rising ember particles in background+ float embers = 0.0;+ for (float i = 0.0; i < 8.0; i++) {+ vec2 pos = vec2(hash(vec2(i, 0.0)), fract(-iTime * 0.03 * (0.5 + hash(vec2(i, 1.0))) + hash(vec2(i, 2.0))));+ float d = length((uv - pos) * vec2(iResolution.x / iResolution.y, 1.0));+ embers += 0.0008 / (d * d + 0.001);+ }++ // Mask: only show effects where terminal is dark+ float lum = dot(term.rgb, vec3(0.2126, 0.7152, 0.0722));+ float mask = smoothstep(0.05, 0.15, lum);++ vec3 glow = vec3(0.25, 0.04, 0.02) * beat * vignette;+ vec3 emberColor = vec3(1.0, 0.3, 0.1) * embers;+ vec3 bg = glow + emberColor * 0.3;++ vec3 color = mix(bg, term.rgb, mask);+ fragColor = vec4(color, term.a);+}diff --git a/shell/themes/blue.conf b/shell/themes/blue.confnew file mode 100644index 0000000000..5e5bb8e729--- /dev/null+++ b/shell/themes/blue.conf@@ -0,0 +1,36 @@+# Blue theme - Default/main projects+background = 0a1628+foreground = e8eef5+cursor-color = 4a9eff+cursor-style = block+selection-background = 1e3a5f+selection-foreground = ffffff++# Normal colors (0-7)+palette = 0=#1a1a2e+palette = 1=#e06070+palette = 2=#50c878+palette = 3=#e0c060+palette = 4=#4a9eff+palette = 5=#b080e0+palette = 6=#50c8d0+palette = 7=#c8d0e0++# Bright colors (8-15)+palette = 8=#2a2a4e+palette = 9=#f07080+palette = 10=#60e088+palette = 11=#f0d070+palette = 12=#6ab4ff+palette = 13=#c090f0+palette = 14=#60d8e0+palette = 15=#e8eef5++# Visual effects+background-opacity = 0.92+custom-shader = ~/.config/ghostty/shaders/blue-glow.glsl+custom-shader = ~/.config/ghostty/shaders/community/cursor_blaze.glsl++# Window padding+window-padding-x = 4+window-padding-y = 2diff --git a/shell/themes/cyan.conf b/shell/themes/cyan.confnew file mode 100644index 0000000000..1966136722--- /dev/null+++ b/shell/themes/cyan.conf@@ -0,0 +1,36 @@+# Cyan theme - Data/Analytics+background = 0a1a1a+foreground = e5f5f5+cursor-color = 4afff0+cursor-style = block+selection-background = 1e4a4a+selection-foreground = ffffff++# Normal colors (0-7)+palette = 0=#182e2e+palette = 1=#e06060+palette = 2=#50c880+palette = 3=#d0d060+palette = 4=#6090d0+palette = 5=#b070c0+palette = 6=#4afff0+palette = 7=#c0d0d0++# Bright colors (8-15)+palette = 8=#284e4e+palette = 9=#f07070+palette = 10=#60d890+palette = 11=#e0e070+palette = 12=#70a0e0+palette = 13=#c080d0+palette = 14=#60fff0+palette = 15=#e5f5f5++# Visual effects+background-opacity = 0.92+custom-shader = ~/.config/ghostty/shaders/cyan-data.glsl+custom-shader = ~/.config/ghostty/shaders/community/cursor_blaze.glsl++# Window padding+window-padding-x = 4+window-padding-y = 2diff --git a/shell/themes/green.conf b/shell/themes/green.confnew file mode 100644index 0000000000..4a32650af8--- /dev/null+++ b/shell/themes/green.conf@@ -0,0 +1,36 @@+# Green theme - Backend/API projects+background = 0a1a0f+foreground = e5f5e8+cursor-color = 4aff6a+cursor-style = block+selection-background = 1e4a2a+selection-foreground = ffffff++# Normal colors (0-7)+palette = 0=#1a2e1a+palette = 1=#e06060+palette = 2=#4aff6a+palette = 3=#d0d060+palette = 4=#6090d0+palette = 5=#b070c0+palette = 6=#50c8a0+palette = 7=#c0d0c0++# Bright colors (8-15)+palette = 8=#2a4e2a+palette = 9=#f07070+palette = 10=#60ff80+palette = 11=#e0e070+palette = 12=#70a0e0+palette = 13=#c080d0+palette = 14=#60d8b0+palette = 15=#e5f5e8++# Visual effects+background-opacity = 0.92+custom-shader = ~/.config/ghostty/shaders/green-rain.glsl+custom-shader = ~/.config/ghostty/shaders/community/cursor_blaze.glsl++# Window padding+window-padding-x = 4+window-padding-y = 2diff --git a/shell/themes/orange.conf b/shell/themes/orange.confnew file mode 100644index 0000000000..af3acda1b4--- /dev/null+++ b/shell/themes/orange.conf@@ -0,0 +1,36 @@+# Orange theme - DevOps/Infrastructure+background = 1a140a+foreground = f5ede5+cursor-color = ff9a4a+cursor-style = block+selection-background = 4a3a1e+selection-foreground = ffffff++# Normal colors (0-7)+palette = 0=#2e2418+palette = 1=#e06050+palette = 2=#50c860+palette = 3=#ffb840+palette = 4=#6090c0+palette = 5=#c070a0+palette = 6=#50b8a0+palette = 7=#d0c8c0++# Bright colors (8-15)+palette = 8=#4e3828+palette = 9=#f07060+palette = 10=#60d870+palette = 11=#ffc860+palette = 12=#70a0d0+palette = 13=#d080b0+palette = 14=#60c8b0+palette = 15=#f5ede5++# Visual effects+background-opacity = 0.92+custom-shader = ~/.config/ghostty/shaders/orange-forge.glsl+custom-shader = ~/.config/ghostty/shaders/community/cursor_blaze.glsl++# Window padding+window-padding-x = 4+window-padding-y = 2diff --git a/shell/themes/purple.conf b/shell/themes/purple.confnew file mode 100644index 0000000000..d284d78fcc--- /dev/null+++ b/shell/themes/purple.conf@@ -0,0 +1,36 @@+# Purple theme - Frontend/UI projects+background = 150a20+foreground = f0e8f5+cursor-color = b44aff+cursor-style = block+selection-background = 3a1e5f+selection-foreground = ffffff++# Normal colors (0-7)+palette = 0=#1e1428+palette = 1=#e06080+palette = 2=#50c870+palette = 3=#d0c060+palette = 4=#7080e0+palette = 5=#b44aff+palette = 6=#60a0d0+palette = 7=#c8c0d0++# Bright colors (8-15)+palette = 8=#2e2448+palette = 9=#f07090+palette = 10=#60d880+palette = 11=#e0d070+palette = 12=#8090f0+palette = 13=#c46aff+palette = 14=#70b0e0+palette = 15=#f0e8f5++# Visual effects+background-opacity = 0.92+custom-shader = ~/.config/ghostty/shaders/purple-nebula.glsl+custom-shader = ~/.config/ghostty/shaders/community/cursor_blaze.glsl++# Window padding+window-padding-x = 4+window-padding-y = 2diff --git a/shell/themes/red.conf b/shell/themes/red.confnew file mode 100644index 0000000000..f35a157e75--- /dev/null+++ b/shell/themes/red.conf@@ -0,0 +1,36 @@+# Red theme - Production/Critical+background = 1a0a0a+foreground = f5e5e5+cursor-color = ff4a4a+cursor-style = block+selection-background = 4a1e1e+selection-foreground = ffffff++# Normal colors (0-7)+palette = 0=#2e1818+palette = 1=#ff4a4a+palette = 2=#50c860+palette = 3=#e0c050+palette = 4=#6088d0+palette = 5=#c060b0+palette = 6=#50b8b8+palette = 7=#d0c8c8++# Bright colors (8-15)+palette = 8=#4e2828+palette = 9=#ff6a6a+palette = 10=#60d870+palette = 11=#f0d060+palette = 12=#70a0e0+palette = 13=#d070c0+palette = 14=#60c8c8+palette = 15=#f5e5e5++# Visual effects+background-opacity = 0.92+custom-shader = ~/.config/ghostty/shaders/red-pulse.glsl+custom-shader = ~/.config/ghostty/shaders/community/cursor_blaze.glsl++# Window padding+window-padding-x = 4+window-padding-y = 2diff --git a/update.sh b/update.shnew file mode 100755index 0000000000..805b2b0ed0--- /dev/null+++ b/update.sh@@ -0,0 +1,37 @@+#!/bin/bash+set -e++echo "==================================="+echo " PortOS Update"+echo "==================================="+echo ""++# Pull latest+echo "Pulling latest changes..."+git pull --rebase --autostash+echo ""++# Update dependencies+echo "Updating dependencies..."+npm install+cd client && npm install && cd ..+cd server && npm install && cd ..+echo ""++# Run setup (data dirs + browser deps)+echo "Ensuring data & browser setup..."+npm run setup+echo ""++# Ghostty sync (if installed)+node scripts/setup-ghostty.js+echo ""++echo "==================================="+echo " Update Complete!"+echo "==================================="+echo ""+echo "Restart PortOS:"+echo " Development: npm run dev"+echo " Production: npm run pm2:restart"+echo ""