Compact status bar left side, expand mail preview to 45 chars

Left side simplified:
- Before: 🎩 [Mayor] coordinator (25+ chars)
- After:  🎩 Mayor (10 chars)
- Icon already identifies role, no need for redundancy

Right side expanded:
- status-right-length: 50 → 80
- Mail preview: 20-25 → 45 chars
- Shows more useful context at a glance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-21 23:22:00 -08:00
parent 465d8b77a3
commit c1d090bbc6
2 changed files with 13 additions and 10 deletions

View File

@@ -99,7 +99,7 @@ func runWorkerStatusLine(rigName, polecat, crew, issue string) error {
// Mail preview
if identity != "" {
unread, subject := getMailPreview(identity, 25)
unread, subject := getMailPreview(identity, 45)
if unread > 0 {
if subject != "" {
parts = append(parts, fmt.Sprintf("\U0001F4EC %s", subject))
@@ -146,7 +146,7 @@ func runMayorStatusLine(t *tmux.Tmux) error {
rigCount := len(rigs)
// Get mayor mail with preview
unread, subject := getMailPreview("mayor/", 20)
unread, subject := getMailPreview("mayor/", 45)
// Build status
var parts []string

View File

@@ -446,22 +446,25 @@ var roleIcons = map[string]string{
}
// SetStatusFormat configures the left side of the status bar.
// Shows: icon [rig/worker] role
// Shows compact identity: icon + minimal context
func (t *Tmux) SetStatusFormat(session, rig, worker, role string) error {
// Get icon for role (empty string if not found)
icon := roleIcons[role]
// Format: 😺 [gastown/Rictus] polecat
// Compact format - icon already identifies role
// Mayor: 🎩 Mayor
// Crew: 👷 gastown/max
// Polecat: 😺 gastown/Toast
var left string
if rig == "" {
// Mayor or other top-level agent
left = fmt.Sprintf("%s [%s] %s ", icon, worker, role)
// Town-level agent (Mayor, Deacon)
left = fmt.Sprintf("%s %s ", icon, worker)
} else {
left = fmt.Sprintf("%s [%s/%s] %s ", icon, rig, worker, role)
// Rig-level agent - show rig/worker
left = fmt.Sprintf("%s %s/%s ", icon, rig, worker)
}
// Allow enough room for the identity (increased for icon)
if _, err := t.run("set-option", "-t", session, "status-left-length", "45"); err != nil {
if _, err := t.run("set-option", "-t", session, "status-left-length", "25"); err != nil {
return err
}
_, err := t.run("set-option", "-t", session, "status-left", left)
@@ -475,7 +478,7 @@ func (t *Tmux) SetDynamicStatus(session string) error {
// gt status-line reads env vars and mail to build the status
right := fmt.Sprintf(`#(gt status-line --session=%s 2>/dev/null) %%H:%%M`, session)
if _, err := t.run("set-option", "-t", session, "status-right-length", "50"); err != nil {
if _, err := t.run("set-option", "-t", session, "status-right-length", "80"); err != nil {
return err
}
// Set faster refresh for more responsive status