mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-23 00:44:15 +01:00
feat(e2e): sync the neutral core from kfde b3dc2ed9
This commit is contained in:
1 parent
e5c1e2fa75
commit
a2ab755352
2 files changed
+39
-5
No files matched your search
@@ -58,18 +58,18 @@ def run(platform: Platform, checks: Checks, clients: list[Client]) -> None:
|
||||
)
|
||||
|
||||
|
||||
# What is asked of the layout, which a maximized window is not in: none of it does anything.
|
||||
# What is asked of the layout, which a maximized window is not in: none of it does anything. Not in
|
||||
# the list, because komorebi for Windows does not ignore them either: `toggle-float`, which floats
|
||||
# the maximized window (`user` ends with it), and `stack left` and `stack right`, which stack the
|
||||
# tiles that are left.
|
||||
IGNORED = (
|
||||
"move left",
|
||||
"move right",
|
||||
"move up",
|
||||
"move down",
|
||||
"stack left",
|
||||
"stack right",
|
||||
"unstack",
|
||||
"cycle-move next",
|
||||
"promote",
|
||||
"toggle-float",
|
||||
"toggle-monocle",
|
||||
"resize-edge left increase",
|
||||
"send-to-workspace 1",
|
||||
@@ -165,3 +165,32 @@ def user(platform: Platform, checks: Checks, clients: list[Client]) -> None:
|
||||
timeout=20,
|
||||
),
|
||||
)
|
||||
|
||||
# `toggle-float` is asked of the window in front, and that is the maximized one: it floats and
|
||||
# is not maximized any more, as on komorebi for Windows
|
||||
platform.user_maximize(target)
|
||||
platform.wait_for(lambda: maximized() == target.title, timeout=20)
|
||||
platform.komorebic("toggle-float")
|
||||
checks.check(
|
||||
f"toggle-float floats {target.title}, which the user maximized, and ends the maximize",
|
||||
platform.wait_for(
|
||||
lambda: (
|
||||
maximized() is None
|
||||
and [w.title for w in platform.state().workspace().floating] == [target.title]
|
||||
and containers() == count - 1
|
||||
),
|
||||
timeout=20,
|
||||
),
|
||||
)
|
||||
platform.komorebic("toggle-float")
|
||||
checks.check(
|
||||
f"... and again puts {target.title} back in the layout",
|
||||
platform.wait_for(
|
||||
lambda: (
|
||||
containers() == count
|
||||
and platform.state().workspace().floating == []
|
||||
and tiled(platform, clients)
|
||||
),
|
||||
timeout=20,
|
||||
),
|
||||
)
|
||||
@@ -24,7 +24,6 @@ ASKED_OF_THE_LAYOUT = (
|
||||
"unstack",
|
||||
"cycle-move",
|
||||
"promote",
|
||||
"toggle-float",
|
||||
"toggle-monocle",
|
||||
"resize-edge",
|
||||
"send-to-workspace",
|
||||
@@ -763,6 +762,12 @@ class FakePlatform:
|
||||
self.paused = not self.paused
|
||||
case ("toggle-tiling",):
|
||||
self.tiling = not self.tiling
|
||||
case ("toggle-float",) if self.maximized is not None:
|
||||
# a maximized window is not in the layout: floating it ends the maximize
|
||||
self.floats.append(self.maximized)
|
||||
self.maximized = None
|
||||
self.max_home = None
|
||||
self._relayout()
|
||||
case ("toggle-float",):
|
||||
if self.floats:
|
||||
self.containers.insert(self.focus, [self.floats.pop()])
|
||||
|
||||
Reference in new issue
Block a user