feat: Nerd Font support, clipboard paste, and PTY environment fixes
- Add ttyd-nerd-font submodule with embedded JetBrains Mono Nerd Font for proper icon rendering in browser via ttyd - Add Ctrl+Shift+V / Shift+Insert paste support in ttyd frontend - Strip Zellij env vars from PTY child processes to prevent workspace terminal from inheriting Zellij session context - Launch PTY commands through login shell for proper PATH resolution - Use /etc/passwd shell lookup instead of $SHELL (Zellij overrides it) - Soften ANSI 256-color palette to match modern dark themes - Handle Nerd Font PUA glyphs as width 1 in pyte terminal emulator - Fix brightmagenta typo in pyte graphics - Update install script to build ttyd from submodule source - Add web deployment TODO items for image paste and context menu Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+18
-7
@@ -57,12 +57,23 @@ fi
|
||||
|
||||
SESSION_NAME="clide-$PROJECT"
|
||||
|
||||
# Check if session exists (live or dead)
|
||||
cd "$WORKDIR"
|
||||
if zellij list-sessions 2>/dev/null | grep -q "$SESSION_NAME"; then
|
||||
# Attach to existing session (resurrects dead sessions automatically)
|
||||
exec zellij attach "$SESSION_NAME"
|
||||
# Clean up dead/exited zellij sessions for this project
|
||||
if zellij list-sessions 2>/dev/null | grep -q "$SESSION_NAME.*EXITED"; then
|
||||
zellij delete-session "$SESSION_NAME" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Try to attach to a live session, otherwise create fresh
|
||||
if zellij list-sessions 2>/dev/null | grep -q "^$SESSION_NAME "; then
|
||||
# Session exists and is alive -- attach
|
||||
exec zellij attach "$SESSION_NAME" \
|
||||
options --no-pane-frames --default-cwd "$WORKDIR"
|
||||
else
|
||||
# Create new session
|
||||
exec zellij --session "$SESSION_NAME" options --default-shell "$CLIDE_BIN" --default-cwd "$WORKDIR"
|
||||
# No live session -- kill any zombie remnants and start fresh
|
||||
zellij delete-session "$SESSION_NAME" 2>/dev/null || true
|
||||
|
||||
exec zellij --session "$SESSION_NAME" \
|
||||
options \
|
||||
--no-pane-frames \
|
||||
--default-shell "$CLIDE_BIN" \
|
||||
--default-cwd "$WORKDIR"
|
||||
fi
|
||||
|
||||
@@ -13,7 +13,8 @@ WorkingDirectory=/mnt/media/Projects
|
||||
# -W : Writable (allows input)
|
||||
# -a : Allow URL arguments (passes ?project=X as command arg)
|
||||
# -t fontSize=14: Terminal font size
|
||||
ExecStart=/usr/local/bin/ttyd -p 8888 -W -a -t fontSize=14 /usr/local/bin/clide-launcher
|
||||
# -t fontFamily: Use embedded JetBrains Mono Nerd Font (from ttyd-nerd-font fork)
|
||||
ExecStart=/usr/local/bin/ttyd -p 8888 -W -a -t fontSize=14 -t 'fontFamily=JetBrains,monospace' /usr/local/bin/clide-launcher
|
||||
|
||||
# Kill all child processes (ttyd → zellij → clide → claude)
|
||||
KillMode=control-group
|
||||
|
||||
@@ -16,9 +16,20 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
SUDO_USER="${SUDO_USER:-$(logname)}"
|
||||
USER_HOME=$(eval echo ~"$SUDO_USER")
|
||||
|
||||
echo "[1/6] Installing ttyd..."
|
||||
curl -L https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.x86_64 -o /usr/local/bin/ttyd
|
||||
echo "[1/6] Building ttyd (with Nerd Font support)..."
|
||||
TTYD_SRC="$SCRIPT_DIR/ttyd-nerd-font"
|
||||
if [[ ! -d "$TTYD_SRC/src" ]]; then
|
||||
echo "Error: ttyd-nerd-font submodule not initialized."
|
||||
echo "Run: git submodule update --init deploy/ttyd-nerd-font"
|
||||
exit 1
|
||||
fi
|
||||
mkdir -p "$TTYD_SRC/build"
|
||||
cd "$TTYD_SRC/build"
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release >/dev/null 2>&1
|
||||
make -j"$(nproc)" >/dev/null 2>&1
|
||||
cp "$TTYD_SRC/build/ttyd" /usr/local/bin/ttyd
|
||||
chmod +x /usr/local/bin/ttyd
|
||||
cd "$SCRIPT_DIR"
|
||||
ttyd --version
|
||||
|
||||
echo ""
|
||||
|
||||
Submodule
+1
Submodule deploy/ttyd-nerd-font added at 8a6e952254
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
# Temporary script to install ttyd-nerd-font and restart service
|
||||
set -e
|
||||
|
||||
systemctl stop clide-web
|
||||
cp /mnt/media/Projects/clide/deploy/ttyd-nerd-font/build/ttyd /usr/local/bin/ttyd
|
||||
cp /mnt/media/Projects/clide/deploy/clide-web.service /etc/systemd/system/clide-web.service
|
||||
systemctl daemon-reload
|
||||
systemctl start clide-web
|
||||
|
||||
echo "Done. ttyd version: $(ttyd --version)"
|
||||
systemctl status clide-web --no-pager
|
||||
Reference in New Issue
Block a user