Skip to content

Astrum v0.3.0

Choose a tag to compare

@robert-mcdermott robert-mcdermott released this 11 Nov 18:32
· 164 commits to main since this release
61a7d66

Multiplexer depth: split panes, sessions that come back after a restart, a
search through the scrollback, links, and a view of its own for each
terminal window. Everything new has a way in for the mouse.

Panes and tabs

  • Split panes: a tab can be divided into several shells, side by side or
    one above the other, as often as there is room. Move between them with
    Ctrl+B and the arrow keys or a click, drag a divider to resize, zoom one
    to fill the tab with Ctrl+B z, close one with Ctrl+B x.
  • Tabs can be reordered: drag one along the tab bar, or Ctrl+B < and
    Ctrl+B >.
  • Right-click a tab or a pane for a menu: rename, move, close, split, zoom.
  • ≡ menu on the status bar opens a menu of everything Ctrl+B offers,
    each entry with its key, so none of it needs the keyboard.
  • The hints shown after Ctrl+B can be clicked as well as typed, and stay
    for ten seconds instead of three (longer while the pointer is moving).
    On a narrow terminal the line shows what fits and ≡ more opens the rest.
  • On a terminal at least 140 columns wide the agent panel opens beside the
    shell instead of below it, with a draggable edge. agent_panel in the
    config file fixes it to bottom or side.
  • The agent works in the pane it was asked from and stays there until it
    has finished, while you carry on in another.

Sessions that come back

  • A session that is stopped, or goes down with the machine, comes back the
    next time it is started: its tabs and their names, the panes of each and
    how they are split, each shell's directory, what each pane showed and
    remembered, and each tab's conversation with the agent. Each pane gets a
    fresh shell; a line marks where the restored part ends.
  • The session is written out as it goes (about fifteen seconds after
    anything changes) and once more when it stops, so a crash loses little.
  • Closing a session's last shell ends it for good and nothing is kept.
    astrum kill --forget stops a session and discards its tabs; astrum ls
    lists stopped sessions that would come back.
  • restore in the config file chooses how much is kept: all (the
    default), layout (nothing of what was on screen is written to disk) or
    off.

Login service

  • astrum service install runs a session under the system's service
    manager: started at login and restarted if it stops. On Linux (a systemd
    user service) the session also keeps running through a logout once
    lingering is on; on macOS (a launchd agent) a logout still ends it and it
    comes back restored. astrum service status, uninstall, and install --print to see what would be written.

Scrollback

  • Search: Ctrl+B /, ≡ menu → Find, or a right-click on the pane opens a
    search bar on the pane. It finds as you type through everything the pane
    remembers, lights up the matches, and says which one you are on; step
    through them with Enter, the arrow keys or the bar's ↑ ↓ buttons.
  • Copy mode: Ctrl+B [ gives the keyboard a cursor of its own to move
    through the screen and the scrollback, select with v, and copy with y.
  • ASTRUM_CLIPBOARD_TOOL names the program copied text is handed to, or
    none to leave copying to the terminal.

Several terminals, links, and what programs are told

  • Each terminal attached to a session has its own view: its own tab in
    front, its own menus and prompts, drawn to its own size. Two terminals on
    the same tab share it, sized for the one that used it last. All attached
    terminals used to mirror one view.
  • Links can be followed. Point at a web address in a pane, or at a link a
    program marked as one, and the status bar shows where it goes; Ctrl+click
    opens it, and a right-click offers Open link and Copy link. Only web
    and mail links are opened; any link can be copied. ASTRUM_OPEN_TOOL names the program a
    link is handed to, or none.
  • A shell without the integration (a plain sh, or a shell started inside
    another, such as sudo -s) is asked where it is through its process, so
    the status bar, the tab's name and new tabs follow its directory too.
  • Programs that ask the terminal for its colors (to tell a dark screen
    from a light one) are told the real colors of the terminal Astrum is
    running in, or the theme's when theme_terminal is on. They used to be
    told a fixed dark pair.
  • Enhanced key reports are passed through: a program that asks for them
    (recent Neovim, Helix, fish and others do) is sent keys unambiguously,
    so it can tell Ctrl+I from Tab and Shift+Enter from Enter, and
    hear of keys being held and let go. Programs that do not ask get exactly
    what they got before.

Agent

  • Compacting by itself now takes one line in the panel instead of printing
    the whole summary in the middle of the work. /summary shows the summary
    a compacted conversation continues from; /compact still shows it at once.

Themes

  • One more theme, twenty-one in all: Synthwave.

Upgrading from 0.2.0

  • A session that is already running keeps running the old server. After
    installing, restart each session to get the new one: astrum kill, then
    astrum. The first restart starts afresh, because a 0.2.0 server saved
    nothing to come back to.
  • From then on astrum kill is no longer a clean slate: the session's tabs
    come back the next time it is started. astrum kill --forget stops it
    and discards them, and closing the last shell ends a session for good.
  • What each pane shows and remembers is now written to
    ~/.local/share/astrum/sessions/, readable only by you. Set restore = "layout" to keep tabs and directories but nothing that was on screen, or
    restore = "off" to keep nothing.
  • Ctrl+B [ now starts copy mode; it used to scroll back one page, which
    Shift+PageUp and the mouse wheel still do.
  • The hints after Ctrl+B wait ten seconds for the key that follows,
    where they waited three. Esc lets go at once.
  • With several terminal windows on one session, each now has its own tab in
    front. They used to move together.
  • When it starts, astrum asks your terminal for its colors. A terminal
    that answers no questions at all would hold the start up for two seconds;
    no terminal in common use is known to.

Known limitations

  • Inline images are not shown: image data a program sends is dropped, as
    before.
  • A restored pane gets a new shell in its old directory with its old
    output above it. The programs that were running are not started again,
    and a pane that was inside a full-screen program when the session was
    saved comes back with the scrollback from before that program started.
  • On macOS the login service does not carry a session through a logout,
    because macOS ends every process of the user's then; the session is
    restored at the next login. astrum service install has been run for
    real on Linux only.
  • Ctrl+click on a link reaches Astrum only in terminals that pass it on.
    macOS Terminal and some others keep it for their own menu; the right-click
    menu's Open link works everywhere.
  • Two terminals looking at the same tab share one size for its shells.
  • A link is opened on the machine the terminal runs on with the system's
    own open or xdg-open.
  • Enhanced key reports cover what most programs ask for (telling keys
    apart, and repeats and releases of keys that are sent as codes). A
    program that asks for every key as a code is not told when plain letter
    keys are let go, nor about the modifier keys by themselves, and alternate
    key values are not sent.
  • Reading the terminal's colors was tested against a stand-in terminal, not
    yet by hand with a real one. Enhanced keys were tried with fish 4, and
    otherwise with scripted programs.