wiki

Sessions

Think of T-Strip as two pieces that work together:

Because the server is separate, you can close your terminal, drop your SSH connection, or reboot your computer, and your panes keep running. Come back later and reattach β€” nothing is lost.

πŸ“Έ Screenshot coming here: Diagram showing client and server connected by a unix socket. 🎬 Video coming here: Detach, close terminal, reattach later β€” your work is still there.

The idea in one picture

You type in a terminal (client)
              ↓ keystrokes
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚   T-Strip server    β”‚  ← owns panes, PTYs, scrollback
   β”‚ (runs in background)β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
              ↑ frames to draw
   You see output in your terminal (client)

Session commands

Command What it does
tst Attach to session β€œmain” (create it if needed)
tst -s work Attach to session β€œwork”
tst new work Create session β€œwork” and attach (error if it exists)
tst attach work Attach to an existing session
tst ls List all live sessions (panes, attached/detached)
tst kill work End a session and every program in it
tst local Run without a background session (closes when the terminal closes)

πŸ“Έ Screenshot coming here: Output of tst ls showing one attached and one detached session. 🎬 Video coming here: Creating, listing, and killing sessions.

Detach and reattach

Inside T-Strip, press alt+d to detach. The server keeps running and your panes keep producing output. Close your terminal or drop SSH β€” it does not matter.

Come back later:

tst            # attach to "main"
tst -s work    # attach to "work"
tst attach work

When you reattach, everything is re-laid out for your new terminal size, and the scrollback that filled while you were away is all still there.

Only one client can be attached to a session at a time. If you attach from a second terminal, the first client is told to leave and exits with a notice. This is handy for moving between machines.

Control a running session from anywhere

Once a session is running, any shell or script can drive it. The program always goes in double quotes, as one argument:

tst open "htop" -n 3 -w 0.33 -s test   # htop, workspace 3, 33% wide, session "test"
tst open "tail -f /var/log/syslog" --below
tst open "make watch" -k               # -k: keep keyboard focus where it is
tst open                                # no program: a new shell
tst workspace 3                         # switch the view
tst focus left                          # left | right | up | down
tst width 50%                           # resize the focused column
tst send -e "make test"                 # type into a pane (-e presses Enter)
tst close                               # close the focused pane
tst list                                # list panes (id, workspace, column, width, program)
tst action overview                     # run any action by name
tst action goto_workspace 2

Flags may go before or after the program. -s NAME picks the session; otherwise it defaults to the session you are inside (every pane has TST_SESSION and TST_PANE set), else main.

Inside tst local there is no session, so name one with -s.

open starts the program in the directory you ran the command from (-d DIR to choose another).

πŸ“Έ Screenshot coming here: Terminal running tst open "htop" and tst list. 🎬 Video coming here: Controlling a running session from another terminal window.

Files on disk

Everything lives under $XDG_RUNTIME_DIR/tst-<uid>/ (or the temp folder), mode 0700:

File Purpose
NAME.sock The unix socket clients connect to
NAME.log The server’s output, useful for crash reports

Session names may contain letters, digits, ., _, - (up to 48 characters).

πŸ“Έ Screenshot coming here: The session socket and log files on disk. 🎬 Video coming here: Finding the logs when something goes wrong.

Ending a session

There is no saved session state on disk. A session exists only while its server is running. If the machine restarts, sessions are gone β€” like tmux without plugins.

🎬 Video coming here: The difference between detach and kill.