feat: expose tmux window index reset

This commit is contained in:
2026-06-10 22:02:09 -04:00
parent bebdf8c1ee
commit ee4bb4cbfa
2 changed files with 15 additions and 0 deletions
+4
View File
@@ -116,3 +116,7 @@ class TmuxManager:
async def set_window_label(self, window_name: str, label: str) -> None:
"""Set the status-bar label for a window (status symbol + name)."""
await self.runner.set_window_label(window_name, label)
async def reset_window_indexes(self, home_window: str) -> bool:
"""Compact tmux window indexes while keeping the home window at 0."""
return await self.runner.reset_window_indexes(home_window)
+11
View File
@@ -1041,6 +1041,17 @@ async def test_manager_set_window_label_delegates(runner):
assert "○ deadproj" in args
@pytest.mark.asyncio
async def test_manager_reset_window_indexes_delegates(runner):
mgr = TmuxManager(runner)
runner.reset_window_indexes = AsyncMock(return_value=True)
result = await mgr.reset_window_indexes("⌂ HQT")
assert result is True
runner.reset_window_indexes.assert_awaited_once_with("⌂ HQT")
@pytest.mark.asyncio
async def test_apply_theme_sets_session_scoped_status_options(runner):
"""apply_theme themes the status bar in one atomic styling call.