diff options
| author | user <user@clank> | 2026-09-02 15:03:53 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-09-02 15:03:53 +0200 |
| commit | 1a3ba183ae8f2613cae847c8f6460782512acc40 (patch) | |
| tree | 68bdc1e82b25e40452e2400ddcfcd2e6dd05b36e /include | |
| parent | Merge branch 'multiplayer': shared multi-client attach (diff) | |
| download | slosh-1a3ba183ae8f2613cae847c8f6460782512acc40.tar.gz slosh-1a3ba183ae8f2613cae847c8f6460782512acc40.tar.xz slosh-1a3ba183ae8f2613cae847c8f6460782512acc40.zip | |
multi-attach: say who else is watching, and where you are
A small tag in each client's own top-right corner when several
terminals share the session: the viewer count, and on a view that is
a crop being panned by somebody else's cursor, the crop's offset into
the shared screen ("2 clients +12+4") -- which is exactly the moment
a screen moving on its own needs explaining. Stamped per client after
projection, because every terminal has its own count of others and
its own offset; the shared status bar is composed once and can be
cropped out of a panned view anyway. attach_indicator false hides
it.
Diffstat (limited to 'include')
| -rw-r--r-- | include/app.h | 1 | ||||
| -rw-r--r-- | include/config.h | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/app.h b/include/app.h index b3dd57c..f0928d7 100644 --- a/include/app.h +++ b/include/app.h @@ -63,6 +63,7 @@ size_t app_config_files(const char **out, size_t max); * a running session: may several clients attach at once, and whose size the * shared screen takes (SIZE_FOLLOWS_* in config.h). */ bool app_cfg_multi_attach(void); +bool app_cfg_attach_indicator(void); int app_cfg_size_follows(void); /* What the config in force complained about while loading, or "". A complaint is * not a failure -- an include that is not there, a shader nobody has heard of -- diff --git a/include/config.h b/include/config.h index 9db9c53..2be60f5 100644 --- a/include/config.h +++ b/include/config.h @@ -318,6 +318,12 @@ typedef struct { * it, which is what anyone using attach-from-elsewhere as "move my session * here and *close it there*" actually wants. */ bool multi_attach; + /* Say so when several clients share the session: a small tag in each + * client's own top-right corner with the viewer count, and -- on a client + * whose view is a crop being panned to follow the active cursor -- the + * crop's offset into the shared screen. Per-client chrome, stamped after + * projection, which is why it is not part of the shared status bar. */ + bool attach_indicator; /* Whose size the shared screen takes when several clients are attached: * the active client (newest attach, then last input -- the default), or * the smallest / largest attached one. Smallest is the tmux rule: nobody |
