Skip to content

Commit 3e289fd

Browse files
update tmux config formatting
1 parent c003032 commit 3e289fd

2 files changed

Lines changed: 18 additions & 5 deletions

File tree

‎backend/fly/fly.go‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,11 +1105,18 @@ func (c *Client) connectInteractive(ctx context.Context, machineID string, opts
11051105
user = "root"
11061106
}
11071107

1108-
// Write tmux config: hide status bar (single window), enable mouse, UTF-8.
1109-
tmuxConf := `set -g status off
1108+
// Write tmux config: pin the silo container name to the bottom status
1109+
// line so it's visible at a glance, enable mouse, UTF-8.
1110+
tmuxConf := fmt.Sprintf(`set -g status on
1111+
set -g status-position bottom
1112+
set -g status-left " %s "
1113+
set -g status-left-length 80
1114+
set -g status-right ""
1115+
set -g window-status-format ""
1116+
set -g window-status-current-format ""
11101117
set -g mouse on
11111118
set -g default-terminal "tmux-256color"
1112-
`
1119+
`, opts.Name)
11131120
_ = c.sshExec(ctx, machineID, fmt.Sprintf("printf %%s %s > /tmp/.silo-tmux.conf",
11141121
shellquote.Join(tmuxConf)))
11151122

‎backend/namespace/namespace.go‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,10 +631,16 @@ func (c *Client) connectInteractive(ctx context.Context, name string, opts backe
631631
innerCmd = strings.Join(parts, " && ")
632632
}
633633

634-
tmuxConf := `set -g status off
634+
tmuxConf := fmt.Sprintf(`set -g status on
635+
set -g status-position bottom
636+
set -g status-left " %s "
637+
set -g status-left-length 80
638+
set -g status-right ""
639+
set -g window-status-format ""
640+
set -g window-status-current-format ""
635641
set -g mouse on
636642
set -g default-terminal "tmux-256color"
637-
`
643+
`, opts.Name)
638644
_ = c.sshExec(ctx, name, fmt.Sprintf("printf %%s %s > /tmp/.silo-tmux.conf",
639645
shellquote.Join(tmuxConf)))
640646

0 commit comments

Comments
 (0)