feat: expose tmux window index reset
This commit is contained in:
@@ -116,3 +116,7 @@ class TmuxManager:
|
|||||||
async def set_window_label(self, window_name: str, label: str) -> None:
|
async def set_window_label(self, window_name: str, label: str) -> None:
|
||||||
"""Set the status-bar label for a window (status symbol + name)."""
|
"""Set the status-bar label for a window (status symbol + name)."""
|
||||||
await self.runner.set_window_label(window_name, label)
|
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)
|
||||||
|
|||||||
@@ -1041,6 +1041,17 @@ async def test_manager_set_window_label_delegates(runner):
|
|||||||
assert "○ deadproj" in args
|
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
|
@pytest.mark.asyncio
|
||||||
async def test_apply_theme_sets_session_scoped_status_options(runner):
|
async def test_apply_theme_sets_session_scoped_status_options(runner):
|
||||||
"""apply_theme themes the status bar in one atomic styling call.
|
"""apply_theme themes the status bar in one atomic styling call.
|
||||||
|
|||||||
Reference in New Issue
Block a user