mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-16 05:41:16 +01:00
fix(nix): the monocle check and the fakes, after merging the agents
This commit is contained in:
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)
|
window = platform.os_window(last)
|
||||||
checks.check(
|
checks.check(
|
||||||
"... without going past the work area",
|
"... 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(
|
checks.check(
|
||||||
"... the daemon's state has it as the monocle container",
|
"... the daemon's state has it as the monocle container",
|
||||||
|
|||||||
@@ -168,6 +168,24 @@ class FakeDesk:
|
|||||||
def screenshot(self, name: str) -> Image.Image:
|
def screenshot(self, name: str) -> Image.Image:
|
||||||
return Image.new("RGB", (4, 4))
|
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:
|
def exe_id(self, program: str) -> str:
|
||||||
return program
|
return program
|
||||||
|
|
||||||
@@ -249,7 +267,14 @@ class FakeDesk:
|
|||||||
mon.spaces.append(Space())
|
mon.spaces.append(Space())
|
||||||
mon.shown = workspace
|
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)
|
self.order.append(title)
|
||||||
target = self._by_rule(title)
|
target = self._by_rule(title)
|
||||||
if target is not None:
|
if target is not None:
|
||||||
|
|||||||
@@ -339,8 +339,7 @@ class FakePlatform:
|
|||||||
self._place(title)
|
self._place(title)
|
||||||
else:
|
else:
|
||||||
self.containers.append([title])
|
self.containers.append([title])
|
||||||
if len(self.containers) > len(self.tiles):
|
self._relayout()
|
||||||
self._relayout()
|
|
||||||
if not self.keeps_fullscreen:
|
if not self.keeps_fullscreen:
|
||||||
self.fullscreened = None
|
self.fullscreened = None
|
||||||
if self.applies_rules_on_event:
|
if self.applies_rules_on_event:
|
||||||
@@ -419,6 +418,9 @@ class FakePlatform:
|
|||||||
def resizable_display(self) -> int | None:
|
def resizable_display(self) -> int | None:
|
||||||
return self.display_count - 1 if self.resizable and self.display_count > 1 else 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]:
|
def _others(self) -> list[Rect]:
|
||||||
"""The displays after the first, side by side to its right."""
|
"""The displays after the first, side by side to its right."""
|
||||||
found = []
|
found = []
|
||||||
|
|||||||
Reference in new issue
Block a user