feat: add tmux config + dev session bootstrap

- tmux.conf: 256-color, mouse, sensible defaults, purple status bar
- dev-session.sh: 2-window layout (hermes TUI + timmy devloop)
- install.sh: symlinks configs into place
- Auto-attach via .zshrc on Terminal.app open
This commit is contained in:
Alexander Whitestone
2026-03-15 07:51:43 -04:00
parent ffb33de0ed
commit 474e9660fb
3 changed files with 134 additions and 0 deletions

67
tmux/dev-session.sh Executable file
View File

@@ -0,0 +1,67 @@
#!/usr/bin/env bash
# ── Dev Session Bootstrap ──────────────────────────────────────────────
# Creates the standard dev tmux session with two windows:
# Window 1: Hermes TUI
# Window 2: Timmy devloop (3-pane layout)
#
# Source-controlled: gitea/rockachopa/hermes-config
# ───────────────────────────────────────────────────────────────────────
SESSION="dev"
export PATH="$HOME/.local/bin:$HOME/.hermes/bin:/usr/local/bin:$PATH"
# If session already exists, just attach
if tmux has-session -t "$SESSION" 2>/dev/null; then
exec tmux attach -t "$SESSION"
fi
# ── Window 1: Hermes TUI ──────────────────────────────────────────────
tmux new-session -d -s "$SESSION" -n "hermes" -x 200 -y 50
tmux send-keys -t "$SESSION:1" "hermes" Enter
# ── Window 2: Timmy Devloop (3-pane) ──────────────────────────────────
tmux new-window -t "$SESSION" -n "timmy-loop"
# Vertical split: left | right
tmux split-window -h -t "$SESSION:2.0"
# Horizontal split on left: top-left / bottom-left
tmux split-window -v -t "$SESSION:2.0"
# Pane map:
# 0 = top-left → Loop
# 1 = bottom-left → Hermes Chat (in Timmy dir)
# 2 = right → Status Dashboard
# Set pane titles
tmux select-pane -t "$SESSION:2.0" -T "Loop"
tmux select-pane -t "$SESSION:2.1" -T "Chat"
tmux select-pane -t "$SESSION:2.2" -T "Status"
# Resize: give right pane ~40 cols for status
tmux resize-pane -t "$SESSION:2.2" -x 45
# Start processes
tmux send-keys -t "$SESSION:2.0" \
"export PATH=\"$HOME/.local/bin:$HOME/.hermes/bin:/usr/local/bin:\$PATH\" && $HOME/.hermes/bin/timmy-loop.sh" Enter
tmux send-keys -t "$SESSION:2.2" \
"$HOME/.hermes/bin/timmy-status.sh" Enter
tmux send-keys -t "$SESSION:2.1" \
"cd ~/Timmy-Time-dashboard && hermes" Enter
# Focus: start on hermes window
tmux select-window -t "$SESSION:1"
echo ""
echo " Dev session ready."
echo ""
echo " Window 1 — hermes : Hermes TUI"
echo " Window 2 — timmy-loop:"
echo " ┌──────────────────┬──────────────────┐"
echo " │ Loop (pane 0) │ Status (pane 2) │"
echo " ├──────────────────┤ │"
echo " │ Chat (pane 1) │ │"
echo " └──────────────────┴──────────────────┘"
echo ""
echo " Attach: tmux attach -t dev"
echo ""

18
tmux/install.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Symlink tmux configs into place
set -e
DIR="$(cd "$(dirname "$0")" && pwd)"
echo "Installing tmux configs..."
# tmux.conf
ln -sf "$DIR/tmux.conf" ~/.tmux.conf
echo " ~/.tmux.conf -> $DIR/tmux.conf"
# dev-session script
mkdir -p ~/.tmux
ln -sf "$DIR/dev-session.sh" ~/.tmux/dev-session.sh
echo " ~/.tmux/dev-session.sh -> $DIR/dev-session.sh"
echo "Done. Changes take effect on next tmux start (or: tmux source ~/.tmux.conf)"

49
tmux/tmux.conf Normal file
View File

@@ -0,0 +1,49 @@
# ── Timmy Dev Environment ──────────────────────────────────────────────
# Source-controlled: gitea/rockachopa/hermes-config
# ── Prefix ─────────────────────────────────────────────────────────────
# Keep default Ctrl-b (Ctrl-a conflicts with shell line-start)
# ── General ────────────────────────────────────────────────────────────
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
set -g history-limit 50000
set -g mouse on
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
set -s escape-time 0
set -g focus-events on
# ── Status Bar ─────────────────────────────────────────────────────────
set -g status-position bottom
set -g status-style "bg=#1a1a2e,fg=#e0e0e0"
set -g status-left "#[bg=#6c5ce7,fg=#ffffff,bold] #S #[default] "
set -g status-left-length 20
set -g status-right "#[fg=#888888]%b %d %H:%M "
set -g status-right-length 30
setw -g window-status-format " #I:#W "
setw -g window-status-current-format "#[bg=#6c5ce7,fg=#ffffff,bold] #I:#W "
# ── Pane Borders ───────────────────────────────────────────────────────
set -g pane-border-style "fg=#333333"
set -g pane-active-border-style "fg=#6c5ce7"
set -g pane-border-status top
set -g pane-border-format " #{pane_title} "
# ── Quality of Life ───────────────────────────────────────────────────
# Easier splits (keep old bindings too)
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# Navigate panes with Alt+arrow (no prefix needed)
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Reload config
bind r source-file ~/.tmux.conf \; display "Config reloaded"
# New windows keep current path
bind c new-window -c "#{pane_current_path}"