fix(nix): the monocle check and the fakes, after merging the agents

This commit is contained in:
LGUG2Z committed 2026-10-30 12:56:48 -07:00
1 parent 86cf814f92
commit c71c8fd013
3 files changed
+31 -4

No files matched your search

@@ -38,7 +38,7 @@ def run(platform: Platform, checks: Checks, clients: list[Client]) -> None:
window = platform.os_window(last)
checks.check(
"... without going past the work area",
window is not None and window.frame.inside(area),
window is not None and window.frame.inside(platform.work_area()),
)
checks.check(
"... the daemon's state has it as the monocle container",
+26 -1
View File
@@ -168,6 +168,24 @@ class FakeDesk:
def screenshot(self, name: str) -> Image.Image:
return Image.new("RGB", (4, 4))
def resizable_display(self) -> int | None:
return None
def resize_display(self, index: int, width: int, height: int) -> None:
pass
def crash(self) -> None:
pass
def temp_path(self, name: str) -> str:
return f"/tmp/{name}"
def fullscreen(self, client: Client, on: bool = True) -> None:
pass
def user_maximize(self, client: Client, on: bool = True) -> None:
pass
def exe_id(self, program: str) -> str:
return program
@@ -249,7 +267,14 @@ class FakeDesk:
mon.spaces.append(Space())
mon.shown = workspace
def spawn(self, title: str, app_id: str | None = None, exe: str | None = None) -> Client:
def spawn(
self,
title: str,
app_id: str | None = None,
exe: str | None = None,
rename_to: str | None = None,
after: float = 0,
) -> Client:
self.order.append(title)
target = self._by_rule(title)
if target is not None:
+4 -2
View File
@@ -339,8 +339,7 @@ class FakePlatform:
self._place(title)
else:
self.containers.append([title])
if len(self.containers) > len(self.tiles):
self._relayout()
self._relayout()
if not self.keeps_fullscreen:
self.fullscreened = None
if self.applies_rules_on_event:
@@ -419,6 +418,9 @@ class FakePlatform:
def resizable_display(self) -> int | None:
return self.display_count - 1 if self.resizable and self.display_count > 1 else None
def resize_display(self, index: int, width: int, height: int) -> None:
self.mode[index] = (width, height)
def _others(self) -> list[Rect]:
"""The displays after the first, side by side to its right."""
found = []