445 Commits
Author SHA1 Message Date
HomerandClaude Fable 5.2 593df939b9 LLeMbas TTY is LLeMbas TERM: the names, what is carried over, three keys, and the keys LLeMbas IDE has too
llembas-term / linux (push) Canceled after 0s
The rename. Commands llembas-term, -gui, -mux-server, -setup; package llembas-term
(Replaces, Conflicts and Provides llembas-tty, so installing it removes the old one);
directories llembas-term; application id eu.llembas.term; the variables a pane sees
LLEMBAS_TERM…; the status record llembas-term-status=1, the input mark
llembas-term-input=1, the user variable llembas_term_status; the shell integration
llembas-term.sh; the workflow llembas-term.yml; every changed upstream block is marked
"LLeMbas TERM:". The terminal needs the engine's terminal contract 4 and says so in
words with an older CLI.

Carried over from the earlier name: the variables LLEMBAS_TTY… of a terminal that
started this one are dropped; a configuration file of the old name is read where it
is while there is none of the new, with a warning; command-history and
settings-chosen are copied once into a data directory that does not exist yet
(llembas-line::migrate); the set-up program prints the new line for an rc file that
has the old one.

Keys. Ctrl+Tab on the ask line switches the mode (the next tab anywhere else);
Ctrl+Shift+M and Ctrl+Alt+M open the lists of chat and autocomplete models, also
over the ask line, which then says the choice. In a pane where LLeMbas IDE says it
is in front (user variable llembas_ide=1) the chords both have are sent on to it as
the keyboard protocol's bytes and the terminal does nothing of its own; the
terminal's palette is also on Ctrl+Shift+Alt+P. The built-in configuration honours
the kitty keyboard protocol for a program that asks for it.

CI: the .deb is installed over the released llembas-tty 1.0.0-beta.5; keys are
pressed in a real window on Xvfb (not a gate).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 20:26:37 +00:00
HomerandClaude Fable 5.2 f3d4fe413c Identity: own names, directories, variables and app id
LLeMbas TTY installs and runs beside WezTerm without touching it:

- binaries llembas-tty, llembas-tty-gui, llembas-tty-mux-server (packages keep
  upstream's names);
- configuration in $XDG_CONFIG_HOME/llembas-tty/llembas-tty.lua or
  ~/.llembas-tty.lua; own data, cache and runtime directories;
- LLEMBAS_TTY_CONFIG_FILE / _CONFIG_DIR / _UNIX_SOCKET / _PANE / _EXECUTABLE
  replace the WEZTERM_ ones, which are neither read nor passed on, so neither
  program talks to the other's panes;
- window class, app id, notification id and bundle id eu.llembas.tty;
- panes get LLEMBAS_TTY=<version>; TERM_PROGRAM stays WezTerm;
- --version shows our version and the WezTerm version it is based on;
- the update check, which asks about WezTerm's releases, is off by default.

The LLeMbas layer (llembas/lua) is compiled in and offered as
require 'llembas'; with no configuration file the built-in one applies it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-01 19:15:13 +00:00
Josh McKinney 28709e0493 termwiz: take &self in Terminal::get_screen_size
No implementation needs mutable access to report the size. The Unix
version issues TIOCGWINSZ on the fd, the Windows version calls
GetConsoleScreenBufferInfo on the handle, and the mux and ssh
implementations copy a cached value.

The &mut requirement came from the UnixTty::get_size and
ConsoleOutputHandle::get_buffer_info helpers, which are both read-only
queries, so they take &self too.

This is a breaking change for implementors of Terminal. Callers are
unaffected, since &mut T coerces to &T.
2026-11-23 13:41:27 +01:00
GhostCoder6969andGhostCoder6969 372548295b mux: spelling mistakes (#8234)
Co-authored-by: GhostCoder6969 <ghostcoder6969@gmail.com>
2026-10-05 05:48:44 +02:00
Benoit de Chezelles b09b56c29c tmuxcc: fix TmuxPty* Write impl to return length of consumed data (#8006)
refs: #8003
2026-09-17 11:44:57 +02:00
xtqqczze b99b1ca2cc lint: fix mismatched_lifetime_syntaxes lint (#8091) 2026-09-05 19:53:14 +02:00
Benoit de Chezelles 17d9fe1f1e mux: Rename+doc Window functions for better readability 2026-08-28 10:12:57 +02:00
xtqqczze 86f17557f4 mux: Replace winapi with windows-sys (#8072) 2026-08-25 16:18:35 +02:00
xtqqczze 1300cfb9b2 filedescriptor: Replace winapi with windows-sys (#8026) 2026-08-18 21:38:28 +02:00
John Xu 1af8f19b56 termwiz-pane: handle IME committed text in prompt overlays (#7556) 2026-08-05 02:38:07 +02:00
Benoit de Chezelles 2bd22e73f7 tmuxcc: fix typo in command for send-keys, use LF instead of CR at eol
refs: #8001
2026-08-04 14:03:24 +02:00
Calle Helmertz 9554bdd04d feat: smart case search (#7385)
Add "smart-case" into the cycling of already existing search modes.

Fixes #6018
2026-07-31 08:32:02 +02:00
Benoit de Chezelles e28fe2f41b doc: Add few comments around pane mux loop 2026-07-14 11:14:16 +02:00
Benoit de Chezelles 38ee9f5df1 misc: fix var name 2026-07-07 09:16:51 +02:00
Joe Xue e46fe38c5a fix: tmux -CC unicode input (#7154)
refs: #7144
2026-06-27 11:08:29 +02:00
Benoit de Chezelles b1cc82bb51 fix: prevent infinite loop when pane search regex fails (#7864)
`fancy_regex` returns Err (e.g. backtracking limit exceeded)
without advancing the iterator position, causing `captures_iter`
to loop forever on the same offset. 😬
👉 Break out and warn instead.

fixes: #7773
2026-06-16 09:42:32 +02:00
Tautik AgrahariandBenoit de Chezelles 297637504a Fix 'the the' typos across doc & code files (#7769)
* docs: fix duplicate-word typos across doc files
* code: fix duplicate 'the the' typos across code files

Co-authored-by: Benoit de Chezelles <benoit.dechezelles@gmail.com>
2026-06-04 14:09:39 +02:00
Wez Furlong 75df5e24d9 cargo fix 2025-10-05 10:58:00 +01:00
Rebecca Turner bf9a2aeeba Fix mismatched_lifetime_syntaxes warnings
Fixes a bunch of warnings like this:

```
warning: hiding a lifetime that's elided elsewhere is confusing
   --> window/src/os/macos/window.rs:670:23
    |
670 |     fn display_handle(&self) -> Result<DisplayHandle, HandleError> {
    |                       ^^^^^            ------------- the same lifetime is hidden here
    |                       |
    |                       the lifetime is elided here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
    = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
    |
670 |     fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError> {
    |                                                     ++++
```

This lint was added in Rust 1.89: https://github.com/rust-lang/rust/issues/141787
2025-09-09 07:05:12 -07:00
Wez Furlong b11cd7ae7e fixup split behavior with default_prog
https://github.com/wezterm/wezterm/pull/6850 changed the behavior
of spawning in such a way that if you had a default_prog and split
a pane, the default_prog you had set would not take effect.

This is because a later normalization stage would skip applying
resolving/applying the default_prog because it thought that the
command builder was already fully baked.

This commit allows that fixup logic to reason about the configured
default_prog (which may be different in a WSL context!) and fixup
the builder.

This is an alternative approach to resolving
https://github.com/wezterm/wezterm/issues/6955 for which a patch was
proprosed in https://github.com/wezterm/wezterm/pull/6972.  That PR
wouldn't be quite right because the underlying logic could consider the
default_prog from a domain-specific source, rather than the global
configuration.
2025-05-24 11:21:04 -07:00
Joe Xue 8fb60ad82b fix: tmux -CC mode not parsing output correctly
refs: #6769
closes: #6779

The tmux output may split into multiple parts, if this spliting happens
in the middle of multiple bytes UTF8 characters, then the issue raised.
That the first part will have incomplete UTF8 character while the second
part will have a invalid UTF8 character.

In this case, we have to treat the output text as bytes rather than
UTF8 string.

This fix unvis the output text and send to pane as bytes.
2025-05-17 06:06:17 -07:00
Joe XueandWez Furlong 4ce83f093a fix: tmux -CC error on %config-error (#6773)
* fix: tmux -CC error on %config-error

refs: #6763

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-03-09 04:25:53 -07:00
Joe Xue dd546c9d98 Reorg the code to put rules/events in alphabet order 2025-03-08 19:24:19 -08:00
Joe Xue 18f7c03d6c Tmux -CC: disable win32 input mode in the control pane (#6768)
On windows, if win32 input mode is active, key presses are encoded by the GUI and will bypass
the key_down logic that we use to detect when the user presses `q` to exit from `tmux -CC` mode.

This commit forces the keyboard encoding to be standard Xterm encoding for the pane
that is running `tmux -CC` mode so that we can catch the `q` press.
2025-03-08 05:33:48 -07:00
Wez Furlong 88905822bf fix: SO_SNDBUF too large on *BSD
closes: https://github.com/wezterm/wezterm/issues/6712
2025-03-07 10:37:29 -07:00
Wez Furlong 2d78db855a mux: fixup debug level for tmux -CC control pane
No need to log an error for each key press
2025-03-07 10:16:19 -07:00
Joe Xue 7e0e15a132 Tmux control: address comments, second round, remove unwrap()
refs: #336
2025-03-07 09:00:48 -08:00
Joe Xue 238896fc41 Tmux control: Address the comments, second round
refs: #336
2025-03-07 09:00:48 -08:00
Joe Xue 36007dca65 Tmux control: Fix the session id prefix
refs: #336
2025-03-07 09:00:48 -08:00
Joe Xue b19fceeba9 Tmux control: put bootstrap pane and tmux panes in same window
refs: #336
2025-03-07 09:00:48 -08:00
Joe Xue 920602eccd Tmux control: address the comments, prevent duplicate outputing
refs: #336
2025-03-07 09:00:48 -08:00
Joe Xue b9e35b6804 Tmux Control: address comments, add history_limit, backlog 2025-03-07 09:00:48 -08:00
Joe Xue 985dfe5cdc Tmux control: address comments, prevent capturing new pane
refs: #336
2025-03-07 09:00:48 -08:00
Joe Xue 279bf50711 Tmux control: address the comments
refs: #336
2025-03-07 09:00:48 -08:00
Joe Xue 9c35d65dae Tmux control: add AttachState to prvent unexpected action in attaching stage
refs: #336
2025-03-07 09:00:48 -08:00
Joe Xue 80299a6321 Tmux control: window name, active panel, active tab
refs: #336
2025-03-07 09:00:48 -08:00
Joe Xue 967d727e3a Tmux control: use async way to handle split pane
refs: #336
2025-03-07 09:00:48 -08:00
Joe Xue 6064ed161f Tmux control: performance improvements
refs: #336
2025-03-07 09:00:48 -08:00
Joe Xue 9954299499 Tmux control: add backward compatibility for tmux
refs: #336
2025-03-07 09:00:48 -08:00
Joe Xue 337efce7ed Tmux control: reflect client window size change to back end
refs: #336
2025-03-07 09:00:48 -08:00
Joe Xue 6821fa5ceb Old tmux versions don't support -f for filter and option default-size
Use other way to archive them
2025-03-07 09:00:48 -08:00
Joe Xue 327a4dd135 Prune panes, tabs
refs: #336
2025-03-07 09:00:48 -08:00
Joe Xue 9fbf154029 Split panel
refs: #336
2025-03-07 09:00:48 -08:00
Joe Xue 3a8c6b66ae Spawn new tab(tmux window)
refs: #336
2025-03-07 09:00:48 -08:00
Joe Xue fbb7aecd9f Tmux controle mode, sync remote windows, layouts, panels
refs: #336
2025-03-07 09:00:48 -08:00
Joe Xue 718d91a62f tmux: fix the crash when start the control mode by "tmux -CC"
refs: #336
2025-03-07 09:00:48 -08:00
Joe Xue 6688566ba5 fix: dead lock in domain_was_detached
refs: #6749
2025-03-06 10:40:26 -08:00
Joe Xue 574e531901 fix: window version stack overflow when run "tmux -CC"
refs: #6671
2025-02-22 13:16:55 -08:00
Wez Furlong 1e52779742 fix brain-o with c_int on windows
clearly not properly awake yet.

refs: https://github.com/wezterm/wezterm/issues/6665
2025-02-13 06:58:34 -07:00
Wez Furlong 04b50b9f6c mux: fix setsockopt invocation for NetBSD
refs: https://github.com/wezterm/wezterm/issues/6665
2025-02-13 06:55:00 -07:00