diff --git a/README.md b/README.md index 11d9113..c996db1 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,9 @@ Optional: enable **Tailscale Serve** on your tailnet for HTTPS preview URLs — ## Daily use - **`ssh devbox`** lands you in fish inside a persistent tmux session. Detach with `Ctrl-b d`, - split with `Ctrl-b |` / `Ctrl-b -`, new window with `Ctrl-b c`. Mouse works and selections + split with `Ctrl-b |` / `Ctrl-b -`, new window with `Ctrl-b c`. On a phone (Termius etc.), + the status bar is touch: **tap a window name to switch**, tap **`[+]`** for a new window, tap + **`[x]`** to close one — no modifier keys. Mouse works and selections copy to your local clipboard. Sessions survive network drops and the nightly reboot — layouts restore, and `claude --continue` resumes a conversation. tmux is what makes reconnecting seamless; if your client drops, reconnect and you're back exactly where you were. diff --git a/files/tmux.conf b/files/tmux.conf index 8cdbba9..688cbe9 100644 --- a/files/tmux.conf +++ b/files/tmux.conf @@ -18,7 +18,27 @@ bind - split-window -v -c "#{pane_current_path}" bind c new-window -c "#{pane_current_path}" set -g status-style "bg=default" set -g status-left "#[bold] #S " -set -g status-right " #H · %H:%M " + +# --- Mobile touch controls ------------------------------------------------- +# tmux handles status-bar taps itself, so these work even when a pane runs an +# agent (no shell needed) and need no modifier keys: +# * single-tap a window name -> switch to it +# * tap [+] -> new window (in the current dir) +# * tap [x] -> close the current window (asks y/n first) +# Keyboard fallbacks stay as tmux defaults: prefix+c new, prefix+& close, +# prefix+n/p/w switch. +set -g status-right "#[range=user|newwin] [+] #[norange]#[range=user|killwin] [x] #[norange] #H · %H:%M " +bind -n MouseDown1Status { + if -F "#{==:#{mouse_status_range},newwin}" { + new-window -c "#{pane_current_path}" + } { + if -F "#{==:#{mouse_status_range},killwin}" { + confirm-before -p "close window '#W'? (y/n)" kill-window + } { + select-window -t= + } + } +} # Session persistence across reboots. # FOOTGUN: the tpm path must be relative to THIS user's home — an absolute