Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion sandbox/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ export COLORTERM="${COLORTERM:-truecolor}"

PROJECT_NAME="${PROJECT_NAME:-sandbox}"

# ---- colorized ls/grep ----
if command -v dircolors >/dev/null 2>&1; then
# Use system default if user hasn't customized ~/.dircolors
if [ -f "$HOME/.dircolors" ]; then
eval "$(dircolors -b "$HOME/.dircolors")"
else
eval "$(dircolors -b)"
fi
fi
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'

# Function to show path relative to /home/agent
_path() {
case "${PWD}" in
Expand All @@ -17,8 +31,18 @@ _path() {
}

# Update prompt on every command
# ---- prompt (Apprentice-friendly) ----
# Color scheme:
# - Username: default color (follows foreground)
# - Hostname: bright blue (brightBlue -> #8FAFD7)
# - Project name: bright cyan (brightCyan -> #5FAFAF)
# - Path: bright yellow (brightYellow -> #FFFFAF)
_ps1_update() {
PS1="\u@\[\e[1;97m\]\h\[\e[0m\]:${PROJECT_NAME}:$(_path)\$ "
local c_reset='\[\e[0m\]'
local c_host='\[\e[94m\]' # brightBlue
local c_proj='\[\e[96m\]' # brightCyan
local c_path='\[\e[93m\]' # brightYellow
PS1="\u@${c_host}\h${c_reset}:${c_proj}${PROJECT_NAME}${c_reset}:${c_path}$(_path)${c_reset}\$ "
}
PROMPT_COMMAND=_ps1_update

Expand Down
24 changes: 22 additions & 2 deletions sandbox/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,27 @@ if [ ! -f /usr/local/bin/ttyd-auth.sh ]; then
fi

# Terminal theme configuration (ttyd expects theme={...} format)
THEME='theme={"foreground":"#ada594","background":"#292724","cursor":"#bc672f","black":"#292724","red":"#816f4b","green":"#ec9255","yellow":"#ffb380","blue":"#957e50","magenta":"#ec9255","cyan":"#ac8e53","white":"#ada594","brightBlack":"#7e7767","brightRed":"#f29d63","brightGreen":"#3d3a34","brightYellow":"#615c51","brightBlue":"#908774","brightMagenta":"#ddcba6","brightCyan":"#e58748","brightWhite":"#f2ead9"}'
THEME='theme={
"background":"#262626",
"foreground":"#BCBCBC",
"cursor":"#BCBCBC",
"black":"#1C1C1C",
"red":"#AF5F5F",
"green":"#5F875F",
"yellow":"#87875F",
"blue":"#5F87AF",
"magenta":"#5F5F87",
"cyan":"#5F8787",
"white":"#6C6C6C",
"brightBlack":"#444444",
"brightRed":"#FF8700",
"brightGreen":"#87AF87",
"brightYellow":"#FFFFAF",
"brightBlue":"#8FAFD7",
"brightMagenta":"#8787AF",
"brightCyan":"#5FAFAF",
"brightWhite":"#FFFFFF"
}'

# Start ttyd with authentication wrapper and theme
ttyd -T xterm-256color -W -a -t "$THEME" /usr/local/bin/ttyd-auth.sh
ttyd -T xterm-256color -W -a -t "$THEME" /usr/local/bin/ttyd-auth.sh
Loading