mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-16 05:41:16 +01:00
komorebi-for-kde/nix/ -> nix/linux/ komorebi-for-mac/nix/ -> nix/macos/ The nix expressions of the platforms (modules, option files, VM test suites, kwin effects, the darwin module) sit next to the existing nix/workspace-src.nix. Renames only (252 files); the flakes that import them are replaced by one root flake later in this stack, so nix does not evaluate at this revision.
34 lines
1.4 KiB
Python
34 lines
1.4 KiB
Python
# `initial_window_placement_rules` in a real (headless) KWin: where in the layout a window that
|
|
# opens goes. The daemon reads the rules from a `komorebi.json` it is started with. The shared
|
|
# scenario (`komorebi_vm.core.scenarios.placement`, which runs on Windows too) checks the places, by
|
|
# number and by title. What only a real KWin can tell is in
|
|
# `komorebi_vm.platforms.kde.extras.placement`: that the program a rule matches is the one a real
|
|
# window has (`foot.exe` being `foot`). The class (the Wayland app id) is a case of the shared one.
|
|
# `komorebi/tests/placement.rs` checks the same against the fake.
|
|
from komorebi_vm import Checks, Kde
|
|
from komorebi_vm.core.scenarios import placement
|
|
from komorebi_vm.core.suite import platform_only, run_suite, shared
|
|
from komorebi_vm.kde_platform import KdePlatform
|
|
from komorebi_vm.platforms.kde.extras import placement as kde_placement
|
|
|
|
start_all()
|
|
machine.wait_for_unit("multi-user.target")
|
|
machine.wait_for_unit("user@1000.service")
|
|
|
|
checks = Checks()
|
|
kde = Kde.headless(machine, "main", size=(1920, 1080), scale=SCALE)
|
|
platform = KdePlatform(kde, (1920, 1080))
|
|
platform.start_komorebi()
|
|
|
|
args = (platform, checks, [])
|
|
run_suite(
|
|
checks,
|
|
shared(placement.run, platform, checks),
|
|
platform_only("kde", kde_placement.by_program, *args),
|
|
)
|
|
|
|
kde.stop_komorebi()
|
|
checks.check("a clean stop", not kde.komorebi_running())
|
|
kde.stop()
|
|
checks.finish()
|