sessui

command module
v0.4.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

sessui

A tmux session switcher in a popup. Shows what every session is doing — local and on your other machines — and gets out of the way.

sessui

Install

TPM — add to ~/.config/tmux/tmux.conf, then prefix + I:

set -g @plugin 'WillyV3/sessui'

TPM fetches the release binary for your machine (Linux or macOS, amd64 or arm64) and checks it against the release's checksums. No Go needed.

Go:

go install github.com/WillyV3/sessui@latest

Neither — grab a binary from releases, put it on your PATH, and bind it yourself:

bind-key s display-popup -E -w 112 -h 26 sessui

A popup larger than the terminal is an error in tmux. The TPM install shrinks it to fit; with your own binding, use sizes like -w 90% -h 80% if you work in small windows.

Needs tmux 3.7+. Earlier versions open the popup but never redraw it. Before 3.3, transparent and borderless have no effect (see Settings).

Keys

Key Does
↑ ↓ move
any letter filter — no /
enter switch, or create a session named by the filter
← → while creating: pick which machine
ctrl+r rename
ctrl+x kill
ctrl+e settings — columns, width, theme, icons, hosts
esc close

Letters filter, so there are no j/k keys. Arrows are the nav.

Other machines

ctrl+e, arrow down to hosts. Your ~/.ssh/config is already the list — space watches one and its sessions join the table.

hosts   ● build-box   ● laptop 1   ○ desk-pi   ○ old-mac   ›

● up · ○ down · ◌ still asking. Reachable machines sort first. Nothing is polled until you pick something. Put the cursor on a ○ and the row says what ssh said — a mistyped name, a sleeping laptop and a captive portal are different problems.

Outside tmux, sessui -hosts prints the same thing as text: every host, its sessions, or why it did not answer.

enter on a remote session attaches over ssh inside a local session named host/name. After that it's a normal local session — instant to switch back to, and it stops showing twice. Kill and rename work on it too.

Inside a remote session there is one tmux, the far one. Your local tmux steps aside for that session: its prefix, its shortcuts and its status line are off, so every key and click goes to the machine you are looking at. Your other sessions are untouched.

  • Back: detach (prefix d). The view closes and you are in the local session you came from. The remote session keeps running.
  • Copying: selection and copy mode are the far tmux's. What you copy reaches this machine's clipboard only with set -g set-clipboard on in your local tmux.conf; tmux's default keeps it on the far machine.
  • Stuck connection: enter ~ . makes ssh hang up, which does the same. A dead connection also closes by itself after about 45 seconds.
  • sessui on the far machine too: prefix s there opens that machine's list, and its own sessions switch as usual. It will not open a session on a third machine from inside your view, or lead you back to the one you are sitting at: it tells you to detach and open it from your own machine.

Creating: type a name, ←→ to pick a machine, enter. Plain enter still creates locally.

Needs: ssh -o BatchMode=yes <host> true works (key auth, no prompt), and tmux on the far end. Nothing gets installed there. Since it shells out to ssh, your ~/.ssh/config does the work — ProxyJump, certs, agent forwarding, Tailscale names.

Settings

ctrl+e edits the real table, live. esc applies, ctrl+z throws it away, ctrl+r resets.

Popup size lives in tmux, because tmux needs it before sessui starts:

Option Default
@sessui-key s prefix + <key>
@sessui-width 112 the table wants ~112 columns
@sessui-height 26

Everything else is ~/.config/sessui/config.json, written for you by ctrl+e:

Key Values
icons nerd | ascii ascii for terminals without a Nerd Font
theme.palette auto | terminal | dark | light auto follows the Omarchy theme where there is one, and is terminal everywhere else: your terminal's own sixteen colours, so it matches any terminal theme
transparent false | true the popup takes the terminal's background (wallpaper, blur) instead of the palette's; next open (TPM popup, see below)
borderless false | true a flush edge instead of tmux's popup border; next open (TPM popup, see below)
columns [{"id","width"}] which columns, in what order
hosts ["alias"] machines to watch

The TPM popup is filled with the palette's background, inside your own tmux popup border (popup-border-lines, popup-border-style). Two rows in ctrl+e change that, and both show the next time you open sessui:

  • fill solid is the palette's background, so a light palette is readable on a dark terminal. transparent is the terminal's background instead. The terminal palette has no background of its own, so there the fill is tmux's popup-style.
  • border off replaces the border with a row of blank cells in the fill's style, so the popup is one flush block. A drawn line sits in the middle of its cell, so a fill could only stop short of it or run past it.

sessui paints its own background on every frame, so a change of palette or of Omarchy theme shows at once, and fill works with a binding of your own too. The border is tmux's to draw: it follows at the next open, border off needs the TPM popup, and both need tmux 3.3+ (display-popup -b, -s, -S).

config.json is read each time the popup opens, so a change made by hand (or by a dotfiles sync) shows at the next open too.

Log

sessui keeps a local log of what it did: each start (version, tmux, whether it is a view from another tmux, whether the terminal is UTF-8), each switch, attach, kill and rename with its outcome and tmux's own error text, and each time a watched host goes up or down. One JSON object a line in ~/.local/state/sessui/sessui.log ($XDG_STATE_HOME), readable only by you, moved aside to sessui.log.1 past 1 MB. It never leaves the machine. sessui -log prints the path.

When an agent needs you

A session stopped on a question or a permission prompt moves to the top of the list, blinks, and says what it is waiting for:

needs you · approve Bash: make install

sessui does not read the agent's screen to learn this. The agent says so itself, with the program status protocol (OSC 7501), and tmux passes it on. Nothing here is specific to one agent: whatever speaks the protocol is heard, in any pane, on this machine or another. Tested with Claude Code and pi, neither of which needed any setup.

tmux carries the protocol from the version after 3.8 (its main branch since November 2026), and an agent only starts reporting once it is restarted inside one. On an older tmux the terminal bell is all there is: a session that rings shows needs you until you visit it. A bell cannot say what for, and an agent set to ring when it finishes a turn will read the same as one asking.

With cp3

Running cp3? sessui matches each session to its peer by directory and adds a peer column — up or down, what it's working on, ✉ when it owes you a reply. No config; it reads cp3 peers if cp3 is there. Without it the column disappears.

Docs

Architecture · Security · Gotchas

License

MIT

Documentation

Overview

Command sessui is a live-updating tmux session switcher.

Directories

Path Synopsis
internal
session
Package session is the data layer: it shells out to tmux and cp3, parses their output, and exposes a plain Session struct.
Package session is the data layer: it shells out to tmux and cp3, parses their output, and exposes a plain Session struct.
ui
Package ui is the bubbletea layer.
Package ui is the bubbletea layer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL