<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sl0pstatus.git/src/widgets/mode.rs, branch main</title>
<subtitle>zellij status plugin</subtitle>
<id>https://git.sl0p.foo/sl0pstatus.git/atom/src/widgets/mode.rs?h=main</id>
<link rel='self' href='https://git.sl0p.foo/sl0pstatus.git/atom/src/widgets/mode.rs?h=main'/>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pstatus.git/'/>
<updated>2026-08-08T21:54:38Z</updated>
<entry>
<title>sl0p: double-click a tab to rename it</title>
<updated>2026-08-08T21:54:38Z</updated>
<author>
<name>user</name>
<email>user@clank</email>
</author>
<published>2026-08-08T21:54:38Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pstatus.git/commit/?id=813d4b80658bfb717d93d539019d970b6fbbd1d0'/>
<id>urn:sha1:813d4b80658bfb717d93d539019d970b6fbbd1d0</id>
<content type='text'>
Double-clicking a tab in the bar switches to it and drops into RenameTab mode,
matching the double-click-to-rename we added for panes in the sl0ppij zellij
fork. Enter commits, Esc cancels, exactly as the rename keybind does.

Widgets are held behind &amp;self and cannot keep click state, so double-click
detection lives centrally in ModuleConfig::handle_mouse_action and is passed
to Widget::process_click as a flag.

THE TRAP, and the reason this is not a two-line change:
handle_mouse_action also runs for Mouse::Release. A single click therefore
arrives as LeftClick followed by Release at the SAME position. Counting
releases would make every single click register as a double click, and
resetting on release would mean a real double click never registers at all,
since the release falls between the two clicks. Only LeftClick participates;
Release neither counts nor resets.

A completed pair is consumed, so a triple click does not fire a second rename.

switch_tab_to() is called before switch_to_input_mode(), because RenameTab acts
on the ACTIVE tab - renaming without switching first would rename the wrong one.

Threshold is 400ms, the same one zellij uses for text-selection double clicks,
so the bar feels consistent with the panes.

Detection is extracted as register_click_for_double_click() so it can be tested
without constructing a ModuleConfig. Tests cover: a real double click, the
release-in-between regression, too-slow clicks, clicks at different positions,
and the triple-click case.

Upstream tests still pass: 25 total (20 upstream + 5 new).

Note: this repo's .cargo/config.toml targets wasm32-wasip1 and runs tests under
wasmtime, which is not installed here. Tests are run with
`cargo test --target x86_64-unknown-linux-gnu` instead.
</content>
</entry>
<entry>
<title>feat: add color aliases</title>
<updated>2024-07-15T14:16:46Z</updated>
<author>
<name>Daniel Jankowski</name>
<email>daniel.jankowski@rub.de</email>
</author>
<published>2024-07-15T14:16:46Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pstatus.git/commit/?id=68d8d4998547e859527ad7aa7112d09ee74f0fbb'/>
<id>urn:sha1:68d8d4998547e859527ad7aa7112d09ee74f0fbb</id>
<content type='text'>
closes #75
</content>
</entry>
<entry>
<title>feat: implement click action for command widget</title>
<updated>2024-06-02T10:32:23Z</updated>
<author>
<name>Daniel Jankowski</name>
<email>daniel.jankowski@rub.de</email>
</author>
<published>2024-06-02T10:32:23Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pstatus.git/commit/?id=d669610cae0051b60dfb9564a52582611968dfad'/>
<id>urn:sha1:d669610cae0051b60dfb9564a52582611968dfad</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat: configure default mode ref for unspecified mode</title>
<updated>2024-02-04T10:59:28Z</updated>
<author>
<name>Daniel Jankowski</name>
<email>daniel.jankowski@rub.de</email>
</author>
<published>2024-02-04T10:59:28Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pstatus.git/commit/?id=0f838ac8a4d6434e9b400d8c781532d9498df14c'/>
<id>urn:sha1:0f838ac8a4d6434e9b400d8c781532d9498df14c</id>
<content type='text'>
fixes #36
</content>
</entry>
<entry>
<title>feat: implement render modes for command widget</title>
<updated>2023-12-25T11:02:04Z</updated>
<author>
<name>Daniel Jankowski</name>
<email>daniel.jankowski@rub.de</email>
</author>
<published>2023-12-25T11:01:22Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pstatus.git/commit/?id=336ace1ec9e4de0b372038dba6158c7dc567c833'/>
<id>urn:sha1:336ace1ec9e4de0b372038dba6158c7dc567c833</id>
<content type='text'>
resolves #25
</content>
</entry>
<entry>
<title>chore: ref config instead of copying</title>
<updated>2023-12-17T14:56:40Z</updated>
<author>
<name>Daniel Jankowski</name>
<email>daniel.jankowski@rub.de</email>
</author>
<published>2023-12-17T14:56:40Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pstatus.git/commit/?id=19b8d9d63c55ade8b1a2fc70732756ae161909b4'/>
<id>urn:sha1:19b8d9d63c55ade8b1a2fc70732756ae161909b4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>chore: move from to_string to to_owned</title>
<updated>2023-12-17T14:18:04Z</updated>
<author>
<name>Daniel Jankowski</name>
<email>daniel.jankowski@rub.de</email>
</author>
<published>2023-12-17T14:18:04Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pstatus.git/commit/?id=ffad61acab9fa3ec771a911de462fa686bea1d67'/>
<id>urn:sha1:ffad61acab9fa3ec771a911de462fa686bea1d67</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat: further perf + mem optimization of widgets</title>
<updated>2023-12-17T13:33:32Z</updated>
<author>
<name>Daniel Jankowski</name>
<email>daniel.jankowski@rub.de</email>
</author>
<published>2023-12-17T13:33:32Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pstatus.git/commit/?id=aa67d6fbecab9a45b6044f019adb303bc84d63fe'/>
<id>urn:sha1:aa67d6fbecab9a45b6044f019adb303bc84d63fe</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat: perf + mem optimization of rendering</title>
<updated>2023-12-17T12:46:19Z</updated>
<author>
<name>Daniel Jankowski</name>
<email>daniel.jankowski@rub.de</email>
</author>
<published>2023-12-17T12:46:19Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pstatus.git/commit/?id=f51455d02e14c447fe174b2ae4869c24e83349d4'/>
<id>urn:sha1:f51455d02e14c447fe174b2ae4869c24e83349d4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat: refactor to lib and add benches</title>
<updated>2023-12-17T11:33:34Z</updated>
<author>
<name>Daniel Jankowski</name>
<email>daniel.jankowski@rub.de</email>
</author>
<published>2023-12-17T11:33:34Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pstatus.git/commit/?id=5892df483ab50215dae01ab5d8fd3aae25b4baa0'/>
<id>urn:sha1:5892df483ab50215dae01ab5d8fd3aae25b4baa0</id>
<content type='text'>
</content>
</entry>
</feed>
