mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-28 11:22:47 +01:00
chore(repo): combine candidate 7 with the pointer-picks-monitor change, the bar wgpu fallback and the macOS deep dedup (candidate 8, before kfw's Windows deep dedup)
Candidate 8 (draft): wip-cand7 plus wip-u-deep (which contains wip-u-ptr: shared focus_workspace_number(s), KDE and macOS get the pointer-picks-monitor preamble, the const removed, and the thin-events design note), wip-u-bar4 (eframe wgpu fallback for the Windows bar, scenario rules) and wip-u-mac-deep (ContainerExt removed, nine shared window_manager functions identical on KDE and macOS, five macOS router arms as named methods). Conflicts, if any, are resolved here.
This commit is contained in:
commit
7a69f692ba
23 files changed
+931
-725
No files matched your search
+31
-43
@@ -25,51 +25,39 @@ macOS (see `docs/dev/macos-handcheck.md`).
|
||||
Not run when it was written (the guest was reserved): lint only (`py_compile`, `ruff`, the runner's
|
||||
157 unit tests pass).
|
||||
|
||||
## The golden guest has no OpenGL 2.0
|
||||
|
||||
The Windows gate (candidate 5) found that the bar cannot open a window in the golden guest:
|
||||
eframe's default renderer is `egui_glow`, the guest has the basic display adapter and QXL and no
|
||||
OpenGL driver, so Windows offers only the generic software OpenGL 1.1 of `opengl32.dll`, and the bar
|
||||
exits at start with `Error: egui_glow: OpenGL: egui_glow requires opengl 2.0+`
|
||||
(`komorebi-bar/src/windows/mod.rs`, the `run_native` error). The scenario therefore reports the
|
||||
window, stays-alive and daemon-restart checks as `skipped: guest has no OpenGL 2.0` when, and only
|
||||
when, the bar's own output says that (`extras/bar.py`, `classify`); any other early exit is a
|
||||
failure. The schema equality, the configuration read, `komorebic state` and `stop --bar` stay real
|
||||
checks. A skip is not a pass: the bar's runtime behaviour is unverified until the guest can draw.
|
||||
## Renderers: glow first, wgpu when there is no OpenGL
|
||||
|
||||
### Getting rendering into the guest (analysis, nothing added)
|
||||
The golden guest has no OpenGL 2.0 (the basic display adapter and QXL; Windows offers only the generic
|
||||
OpenGL 1.1), and eframe's `egui_glow` refuses that: the first gate of the `bar` scenario saw
|
||||
`Error: egui_glow: OpenGL: egui_glow requires opengl 2.0+` and the bar never opened a window.
|
||||
Decision D-coord-14: the Windows bar tries glow as before and, only when glow cannot make its context
|
||||
(`eframe::Error::OpenGL`, `Glutin` or `NoGlutinConfigs`), runs again with eframe's wgpu renderer, which
|
||||
draws through Direct3D 12 and finds the software adapter WARP (Windows 11 ships it in the Basic Render
|
||||
Driver) with no driver and no download (`run_with_fallback` in `komorebi-bar/src/windows/mod.rs`; the
|
||||
`wgpu` feature of `eframe` is in the Windows-only table of `komorebi-bar/Cargo.toml`, the bar core and
|
||||
the macOS bar do not have it). The bar logs `renderer: glow`, and on a fallback `renderer: glow failed
|
||||
(...); trying wgpu`. With both features compiled eframe's default renderer is wgpu, so the first attempt
|
||||
names `Renderer::Glow`: machines where glow works run exactly as before.
|
||||
|
||||
How the context is chosen: `komorebi-bar` uses `eframe` 0.33 with its default features, so only
|
||||
the glow renderer is compiled (glutin + `egui_glow`); `NativeOptions` is left at its defaults on
|
||||
Windows (the macOS bar sets its own), so the bar asks for a hardware OpenGL 2.0+ config through
|
||||
glutin, falls back to the Windows generic GDI implementation (1.1) and `egui_glow` refuses it.
|
||||
In the scenario:
|
||||
|
||||
1. Mesa llvmpipe `opengl32.dll` next to `komorebi-bar.exe` (the classic recipe: Mesa's
|
||||
`opengl32.dll` takes over from the system one for that process). Not possible from this flake:
|
||||
nixpkgs marks `pkgsCross.mingwW64.mesa` as an unsupported platform (`nix build --dry-run` refuses
|
||||
it), and `nixpkgs` has no Windows `opengl32sw.dll` (that file ships with Qt) or ANGLE. Building
|
||||
Mesa for mingw means porting its nix expression (swrast + llvm cross for mingw, a cross LLVM
|
||||
build) and carrying a binary of unknown license status in the image: days of work, hours of
|
||||
build, and the result is a third-party DLL in the test that real users do not run.
|
||||
2. A wgpu renderer with the Windows software adapter. Windows 11 ships WARP, the software
|
||||
Direct3D 12 rasteriser, in the Basic Render Driver, which the guest has; wgpu's DX12 backend
|
||||
finds it as an adapter, no download. In `eframe` this is the `wgpu` feature plus
|
||||
`NativeOptions { renderer: Renderer::Wgpu, .. }` (and `wgpu_options` with a fallback adapter if
|
||||
it does not pick WARP by itself). The sources of the wgpu stack (wgpu 27, naga, wgpu-hal,
|
||||
gpu-allocator, ash) are already in the local cargo registry because they are in `Cargo.lock`
|
||||
as optional dependencies of eframe, so it should build offline. Proposal, smallest first:
|
||||
in `komorebi-bar`'s `[target.'cfg(windows)'.dependencies]` ask for `eframe` with the `wgpu`
|
||||
feature, and at start: try glow as now; if `run_native` fails with the OpenGL message, run again
|
||||
with `Renderer::Wgpu` (the e2e then passes the window checks, and a user without OpenGL gets a
|
||||
bar instead of an error). Cost: about 60 more crates in `Cargo.lock` that are compiled for
|
||||
Windows only (cold build +3 to 5 minutes in CI, +8 to 12 MB in `komorebi-bar.exe`); a retry path
|
||||
that needs `NativeOptions` to be built twice; a new, untested code path for real users (low
|
||||
risk: it only runs where glow already failed). Without the fallback, a `KOMOREBI_BAR_RENDERER=wgpu`
|
||||
switch the scenario sets would keep users on glow and cost the same dependencies.
|
||||
3. ANGLE (EGL on Direct3D 11, itself on WARP) through `glutin`'s EGL support: needs
|
||||
`libEGL.dll`/`libGLESv2.dll`, which are not in nix either. Rejected.
|
||||
- the bar's window, stays-alive, daemon-restart and notify checks are real when either renderer opens the
|
||||
window; the scenario prints which one drew it;
|
||||
- only when both fail (the bar ends with `Error: glow: ...; wgpu: ...`) those checks are skipped, and the
|
||||
skip line names both errors (`skip ...: guest cannot draw: glow: ...; wgpu: ...`); the schema, the
|
||||
configuration read, `komorebic state` and `stop --bar` stay checks; any other early exit of the bar is a
|
||||
failure;
|
||||
- the bar is started with `RUST_LOG=info,wgpu_hal=debug,wgpu_core=warn` so `bar.out` keeps what wgpu says
|
||||
about its adapters (read it first when the window does not appear).
|
||||
|
||||
Recommendation: 2, with the glow-then-wgpu fallback, as its own revision with the e2e `bar`
|
||||
scenario as its gate (the window checks stop being skipped). Whether the guest's WARP accepts
|
||||
wgpu's DX12 device (feature level, no HLSL compiler problem for egui's shaders) can only be
|
||||
learned by running it; the first run should keep `RUST_LOG=wgpu_hal=debug` output in `bar.out`.
|
||||
Cost, measured: 622 -> 664 distinct crate versions in the Windows bar's dependency tree (+42), one new
|
||||
lock entry (`pollster` 0.4.0; the rest of the wgpu stack was already locked as optional dependencies of
|
||||
eframe). Not measured here (no nix build was run): compile time and the size of `komorebi-bar.exe`
|
||||
(estimate: a few minutes cold, 8 to 12 MB).
|
||||
|
||||
Risks: WARP may not accept egui's Direct3D 12 device or the transparent surface the bar asks for
|
||||
(`with_transparent(true)`; only the e2e gate can say); wgpu picks a hardware Vulkan/D3D12 adapter before
|
||||
WARP when there is one, so on a machine with a GPU but broken OpenGL the bar now uses that adapter; a
|
||||
second `run_native` on the same thread relies on eframe reusing its thread-local event loop (it does, by
|
||||
design, for reopening windows).
|
||||
+86
-2
@@ -1390,8 +1390,8 @@ monitors (`CycleMoveContainerToWorkspace`, `CycleSendContainerToWorkspace`, `Cyc
|
||||
`CycleMoveContainerToMonitor`, `CycleSendContainerToMonitor`, `FocusMonitorWorkspaceNumber`,
|
||||
`MoveContainerToMonitorWorkspaceNumber`, `SendContainerToMonitorWorkspaceNumber`) and the lock and
|
||||
unlock of a container by index. The one platform difference found, that Windows lets the pointer pick the
|
||||
monitor first for the empty, close and last-workspace commands (a probable omission on KDE and macOS,
|
||||
section 18), is the const `CommandHost::POINTER_PICKS_THE_MONITOR_FOR_ALL`, true only for Windows.
|
||||
monitor first for the empty, close, last-workspace and workspace-number commands (an omission on KDE and macOS,
|
||||
section 18), is gone: all three do it now (wip-u-ptr), so the const that held the difference was removed.
|
||||
|
||||
**What stays, and why** (identical across the three unless noted; each needs a `WindowManager` method
|
||||
or field, so moving them means moving `WindowManager`, the blockers of section 18):
|
||||
@@ -1409,3 +1409,87 @@ or field, so moving them means moving `WindowManager`, the blockers of section 1
|
||||
`WorkAreaOffset`, ...): thin calls of `WindowManager` methods that edit a workspace and re-layout, the
|
||||
same coupling;
|
||||
- queries, configuration, borders, animations, transparency, schema: statics and the platform.
|
||||
|
||||
## 23. Design note: thin events, a common vocabulary for `process_event` (not implemented)
|
||||
|
||||
Status: design only (D-coord-13 (c)). Nothing here is built; the event enums and handlers are unchanged. The variant lists below were read from the three `window_manager_event.rs` files; how each handler arm behaves was read at section 17 and not re-measured here.
|
||||
|
||||
**Today.** Each daemon has its own `WindowManagerEvent`, built from the platform notification:
|
||||
- Windows: `Destroy, FocusChange, Hide, Cloak, Minimize, Show, Uncloak, MoveResizeStart, MoveResizeEnd, MouseCapture, Maximize, Unmaximize, Manage, Unmanage, Raise, TitleUpdate`, most carrying `(WinEvent, Window)`.
|
||||
- KDE: `FocusChange, Show, Destroy, Minimize, Restore, TitleUpdate, FullscreenChange(bool), OutputChange, MaximizeChange(bool), Manage, Unmanage, MoveStart, MoveEnd, ResizeStart, ResizeEnd, ResizeStep, WorkspaceChange(desktop, idx), WorkspaceMove`, carrying `(SystemNotification, Window)`.
|
||||
- macOS: `FocusChange, Show, Destroy, Minimize, Restore, Manage, Unmanage, MoveStart, MoveEnd, ResizeStart, ResizeStep, ResizeEnd, SpaceChange, ScreenLock, ScreenUnlock`, carrying a process id and a window id instead of a `Window`.
|
||||
|
||||
Only `Destroy`, `Show` and `Minimize` exist under the same name on all three; `FocusChange`, `Manage`, `Unmanage`, `TitleUpdate` exist on Windows and KDE (macOS has the first three). The payloads differ: the platform notification, a `Window` or raw ids. So a shared `process_event` cannot match on today's enums.
|
||||
|
||||
**Proposal.** A small enum in `komorebi-core`, generic over the platform's window id and window type, that the platform adapter produces from its notification and that describes what happened, not how the OS said it:
|
||||
|
||||
```rust
|
||||
pub enum CoreEvent<W> {
|
||||
Appeared(W), // Show, Manage, Uncloak, WindowAdded
|
||||
Gone(W), // Destroy, Unmanage, Hide of a managed window
|
||||
Minimized(W), // Minimize, Cloak on Windows
|
||||
Restored(W), // Restore, Unminimize, Uncloak
|
||||
FocusMoved(W), // FocusChange
|
||||
MoveOrResize(Phase, W), // Start, Step, End for Windows MoveResize*, KDE and macOS Move/Resize
|
||||
FullscreenOrMaximize(W, bool),
|
||||
Retitled(W),
|
||||
OutputChanged(W),
|
||||
WorkspaceChanged(..), // KDE virtual desktop, macOS space: the platform tells which workspace
|
||||
}
|
||||
```
|
||||
|
||||
The Windows events that have no other-platform meaning (`MouseCapture`, `Raise`, `Cloak`/`Uncloak` distinctions) stay platform events: the adapter turns them into `CoreEvent` where they mean the same thing and handles the rest itself before or after. A handler for a `CoreEvent` is a `WindowManager` method with a platform hook for each decision the arms make today: `should_manage` (rules, already in `komorebi-rules` or in the daemon), whether the window is on this monitor, the border and transparency refresh after the layout, and the unmanaged-window check at the top (section 18 blocker; the router form is the target).
|
||||
|
||||
**What a shared handler looks like.** For `Gone(w)`: find the container holding `w`, `Workspace::remove_window` (shared), prune empty containers, `update`, then the border hook. For `Appeared(w)`: ask the `should_manage` hook, find the target monitor and workspace through the (shared) rules, `Workspace::new_container_for_window`, `update`, focus hook. For `Minimized(w)`: shared `Workspace` already hides and updates. These three account for the arms the three process_event files share most (sections 17 and 18).
|
||||
|
||||
**Prerequisites** (in order): the unmanaged-window-check converged to the router form on Windows (kfw); `WindowManager<P>` or at least a shared `WindowManagerState<P>` in core so the shared handler has a `self` (section 18 says the 60% threshold is not met yet); a `PlatformMonitorId`; the border calls behind hooks. Without the first two the shared handlers have nothing to run on.
|
||||
|
||||
**Risks.** The ordering of side effects inside each arm is part of today's behaviour, for instance Windows doing the border update before the focus event is forwarded, and KDE debouncing `ResizeStep`; a shared handler must keep the order per platform through hooks, or the change is a BEHAVIOUR change needing the Windows e2e, the KDE VM suites and the macOS hand check. `FocusChange` on macOS carries an optional window id and there is no `Window` yet at that point, so the `CoreEvent<W>` payload cannot always be a window.
|
||||
|
||||
**Decision wanted from the owner.** Whether to pursue this after `WindowManager<P>` lands; the gain is the event-handling arms (about a third of `process_event.rs` by line count at section 17) running natively on a stub for all three platforms.
|
||||
|
||||
## 22. After the macOS deep dedup (kfm, D-coord-13): the container API, the arms, and `update`
|
||||
|
||||
**Done.** (1) macOS `ContainerExt` is gone: every container call in the macOS daemon is the shared
|
||||
`Container::{add_window, load_focused_window, hide, restore}` with `workspace.hide_spot()`, a method of
|
||||
`Workspace` that is `P::hide_spot(self)` (`()` on KDE, `MacosHideSpot` on macOS). (2) the nine window
|
||||
manager functions that differed only in these calls (`add_window_to_container`,
|
||||
`cycle_container_window_in_direction`, `cycle_container_window_index_in_direction`,
|
||||
`focus_container_window`, `stack_all`, `monocle_on`, `monocle_off`, `cycle_monocle`, `transfer_window`)
|
||||
are now byte-identical in `komorebi-for-kde` and `komorebi-for-mac`; the `?` form replaced KDE's
|
||||
`let _ =` (equivalent, its operations always answer `Ok`). Measured with the function splitter: 76 of the
|
||||
92 function names that the two `window_manager.rs` share have the same text, and 1521 of KDE's 2713
|
||||
stripped lines are identical with macOS (56%, from 45% in section 20; the 60% bar needs the platform
|
||||
entry points of blocker 3). (3) `ToggleWorkspaceLayer`, `ResizeWindowAxis`, `SessionFloatRule`,
|
||||
`IgnoreRule` and `ReplaceConfiguration` are methods of the KDE names on macOS and the router arms are the
|
||||
KDE text; `Close`, `Minimize`, `DebugWindow` and `ManageRule` stay macOS's own arms (the foreground
|
||||
element and the role instead of the class; there is no KDE method to match).
|
||||
|
||||
**`update` is not adopted, and why (exact differences from `update_shared`).** Each is a reason, and
|
||||
the first two alone would make it unprovable:
|
||||
|
||||
1. **A scrolling workspace returns early.** macOS's `update` does `return self.arrange_scrolling(..)`
|
||||
inside the tile branch, so for a scrolling workspace it never reaches the closing
|
||||
`self.resize_dimensions.resize(container_count, None)` that `update_shared` always runs, and it places
|
||||
the windows itself (drag-step layout, `adopt_actual_sizes`, `hide_scrolling` at the display edge,
|
||||
the animator), not through one `place_container` per container. Folding it into `scrolling_layouts` plus
|
||||
`place_container` would change both the placement order and whether the resize dimensions are
|
||||
truncated for a scrolling workspace.
|
||||
2. **The SkyLight batch is wider.** macOS disables screen updates around the whole tile branch
|
||||
(monocle, scrolling and the container loop) and re-enables on every exit; a `begin_update` guard would
|
||||
start before `prune_duplicate_windows` and the container retain and end after the resize-dimensions
|
||||
fix-up, and would be taken when `tile` is false as well. Probably harmless, not provable.
|
||||
3. **Own `calculate_layouts`**: the same arrangement call as `update_shared`'s inline one (checked line by
|
||||
line), so this one alone would fold.
|
||||
4. **Unconditional clamp**: `clamp_to_work_area` runs for every non-scrolling layout; the shared
|
||||
`adjust_layout` hook can do that (as KDE's does).
|
||||
5. **No maximized branch**: the macOS workspace never has a `maximized_window` (no writer), so the shared
|
||||
branch is unreachable; `maximize_in_layout` is not needed.
|
||||
6. **Placement errors are logged and the next window is placed** (`tracing::warn!`): a `place_container`
|
||||
hook can swallow them as KDE's does.
|
||||
7. **No second pass and no stackbar**: `end_update` answers `Pass::Done`.
|
||||
|
||||
Items 3 to 7 would fold with hooks; 1 and 2 are the blockers, and 1 is the owner's decision: either the
|
||||
macOS scrolling placement becomes the `scrolling_layouts` and `place_container` hooks (and the
|
||||
truncation of the resize dimensions is accepted for a scrolling workspace, which is a behaviour change),
|
||||
or `update` stays macOS's.
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
Findings of the consolidation reviews and tests that are NOT fixed because whether they are bugs, or how to fix them, is a decision for the owner. Each has the evidence, why it may or may not be a bug, the platforms, and a proposed fix. Paths are relative to the repository root at the time of writing and may have moved.
|
||||
|
||||
## 1. KDE FocusWorkspaceNumber, FocusWorkspaceNumbers and FocusLastWorkspace skip the pointer-monitor preamble
|
||||
## 1. RESOLVED (wip-u-ptr): KDE FocusWorkspaceNumber, FocusWorkspaceNumbers and FocusLastWorkspace skipped the pointer-monitor preamble
|
||||
|
||||
- **Resolution**: the owner approved Windows behaviour for all platforms. The preamble now runs for all three daemons in the shared `komorebi_core::command` functions (`focus_workspace_number`, `focus_workspace_numbers`, `focus_last_workspace`, and the others). KDE is covered by `komorebi-for-kde/komorebi/tests/pointer_monitor.rs`, core by `crates/komorebi-core/tests/commands.rs`. Owed: KDE VM commands and workspace-switch, macOS hand check H1 (docs/dev/macos-handcheck.md). The text below is the original finding.
|
||||
|
||||
- **Evidence**: komorebi-for-kde/komorebi/src/process_command.rs lines 1245-1277: the arms for the three messages call `focus_workspace` on the focused monitor directly. The Windows daemon (komorebi/src/process_command.rs:972-987 for `FocusWorkspaceNumber`, and lines about 2185 and 2215 for the helpers behind `FocusLastWorkspace` and `FocusWorkspaceNumbers`) first checks `monitor_idx_from_current_pos()`: when the pointer is on another monitor whose focused workspace is empty, that monitor becomes the focused one. KDE has the same preamble only in `cycle_focus_workspace` (line 897-909).
|
||||
- **Why it may be a bug**: on a secondary monitor with an empty workspace and the pointer on it, `focus-workspace 2` switches the workspace of the monitor that was focused before, not the one the user is pointing at, unlike on Windows and unlike KDE's own `cycle-focus-workspace`. **Why not**: KWin may not report an empty monitor as pointed at the same way; the KDE tests do not cover it, so it may have been left out on purpose.
|
||||
|
||||
@@ -97,6 +97,8 @@ timeout. Until then H5 documents the hang.
|
||||
| 11(iii) Workspace: `refactor(mac): the daemon's Workspace is komorebi_core::Workspace<MacosPlatform>` (see `jj log -r wip-u-kfm2`) | About 50 workspace functions (container and focus operations, placement, resize constraints, window lookups, floating helpers, the stack and monocle operations that hide windows) are now the shared ones; `hide`, `new_container_for_window` and the stack functions pass the monitor's corner through `MacosPlatform::hide_spot` (kept in `MacosWorkspaceState`, set by the monitor with the globals), and `hide` passes the display bounds for the containers through `hide_spot_on_display`. macOS's own `update`, `apply_wallpaper`, `restore`, `remove_window`, `load_static_config`, `prune_duplicate_windows`, `visible_window_details`, `reap_invalid_windows_for_application`, `restore_windows`, `calculate_layouts` and `set_scrolling_columns` are `WorkspaceExt`; the scrolling methods are `WorkspaceScrolling`. | `cargo test` first (the workspace, scrolling and window_manager tests). Then: stack and unstack, switch workspaces both ways (each stack shows its front window, the hidden ones are in their monitor's corner), toggle monocle and back, float and unfloat a window, cycle the monocle container, move a window to another workspace, move a container across monitors; with a different `window_hiding_position` on each monitor check each monitor's windows park in their own corner and that a floating window that overhangs the edge of a display is still parked on its own display. `komorebic state` keys of a workspace are unchanged (pinned by `state_pin`). Scrolling layout: focus, move, consume and expel, pan, resize a column. |
|
||||
| 11(iii) Monitor: `refactor(mac): the daemon's Monitor is komorebi_core::Monitor<MacosPlatform>` (see `jj log -r wip-u-kfm2`) | The monitor is the shared generic type; the corner (`window_hiding_position`) is the platform's flattened `extra` (written last, as before), the constructors, `update_*_globals`, `load_focused_workspace`, `move_container_to_workspace(1)`, `add_container_with_direction`, `hide_unfocused_workspaces` and `restore_focused_workspace` are `MonitorExt`; `focus_workspace`, `add_container`, `remove_workspace*`, `ensure_workspace_count` and the name and layout lookups are the shared ones. The monitor gives its workspaces the corner through `workspace.state` when it updates their globals. | `cargo test` (monitor tests, `state_pin`). By hand: `komorebic state | jq '.monitors.elements[0] | keys_unsorted'` is the same list as before with `window_hiding_position` last; switch workspaces on each monitor (hide and restore of the whole workspace), focus-workspace by index and by name, move a container to another workspace and to another monitor, unplug and replug a display (the monitor and its workspaces are rebuilt through `Monitor::new` and `update_all_workspace_globals`), a config with `window_hiding_position` per monitor. |
|
||||
| `wip-u-kfm3` registry fixes (see `jj log -r wip-u-kfm3`) | The registry keeps inert application copies (no blocking Accessibility call when an entry is dropped), a window is registered when its observer is attached, a clone being dropped no longer deregisters its window, `forget_pid` runs ahead of the pause and other-space returns, and the application reaper forgets what it reaps. Nothing reads the registry except the unused `MacosBackend`. | H3, H4, H6, H7 above, and the usual walk-through: no change in what the daemon does is expected. |
|
||||
| deep dedup 1: `refactor(mac): the daemon uses the shared Container API with the hide spot` (see `jj log -r wip-u-mac-deep`) | `ContainerExt` (`add_window_at`, `load_focused_window_at`, `hide_on`, `restore_focused_window`) is gone: every call is the shared `Container::{add_window, load_focused_window, hide, restore}` with `workspace.hide_spot()`. `monocle_on` and `cycle_monocle` took the corner from the monitor (`monitor.extra`) and now take it from the workspace (`workspace.state`), which the monitor writes with the globals; `restore()` now skips the Accessibility call under `cfg!(test)`. | `cargo test`; then H1 (hide spot) and: toggle monocle on a workspace with two containers on a monitor with `window_hiding_position: BottomRight` (every other container parks in that corner), cycle the monocle container, stack with `komorebic stack`/`stack-all`, `cycle-stack`, `add-window-to-container`, switch workspaces. Change the monitor's `window_hiding_position` in the config, reload, and toggle monocle at once: the corner must be the new one. |
|
||||
| deep dedup 2: `refactor(mac): five router arms are methods with the KDE names` | `ToggleWorkspaceLayer`, `ResizeWindowAxis`, `SessionFloatRule`, `IgnoreRule` and `ReplaceConfiguration` call `toggle_workspace_layer`, `resize_window_axis`, `add_session_float_rule`, `add_ignore_rule(identifier, id: &str)` and `replace_configuration(&PathBuf)`, with the bodies the arms had (a pure move; the router arms are now the KDE text). `id` of the ignore rule is a `&str`, compared with `==`. | `cargo test`; by hand: `komorebic toggle-workspace-layer` twice (tiling to floating and back: a window of the layer is focused, the others hide at the corner and come back), `resize-axis horizontal|vertical increase|decrease`, `komorebic session-float-rule` on a window, `komorebic ignore-rule exe <name>` and `ignore-rule title/class` (the matching windows leave the workspaces), `komorebic replace-configuration <komorebi.json>` (the daemon restarts its windows under the new config; with a broken file it is left alone). |
|
||||
|
||||
Revisions in section B change no behaviour on purpose (rename, move, route); they still need the sections C walk-through, because a mechanical mistake would show there.
|
||||
|
||||
@@ -164,3 +166,9 @@ Type-check and clippy only; nothing here ran on a Mac. The settings now live in
|
||||
1. **S3 groups (paddings, floating aspect ratio, `layout_defaults`, `display_index_preferences`).** Config with `default_workspace_padding` 20 and `default_container_padding` 15: tiles 20 px from the work area, 15 apart. Reload with the key dropped: padding stays (merge); set it to 5 and reload: 5. `layout_defaults`: set, reload, workspaces use it; remove and reload: they fall back (the key resets). Aspect ratio: `toggle-float` with centring uses the configured ratio; remove the key and reload: 4:3 (Standard). `display_index_preference 0 <serial>`: monitor order follows it. Reload during a drag or workspace switch: no one-frame flash of half-new padding.
|
||||
2. **S5 animation (BEHAVIOUR: one snapshot for enabled, duration, style and fps).** Animation on (`komorebic animation true`), switch workspace: transition plays. While a transition runs, `komorebic animation-duration 1000`, then `animation-style`, then `animation false`: the running transition is not torn (no mix of old duration with new style), the next one follows the new values. Per-kind: `animation true --movement`, `animation false` (global): per-kind values are cleared by a global value, so movement is off again. Reload a file with `"animation": {"enabled": {"movement": true}}`: only movement animates and the global flag is untouched; reload a file with `"animation": {"enabled": true}` (no fps): fps back to 60; reload a file with no animation block: all animation settings keep their values. `komorebic animation-fps 30` then watch frame cadence. Stack a window (`stack`): no animation during the stack (the `suspend()` counter, unchanged), and animation is back after it, including after a stack command that fails.
|
||||
3. The border and transparency groups (S6, S4) are not moved on macOS: transparency does not exist there.
|
||||
|
||||
## H. Pointer picks the monitor (wip-u-ptr), appended by the KDE agent
|
||||
|
||||
Type-check and clippy only (fake CC); nothing here ran on a Mac.
|
||||
|
||||
1. **Pointer on an empty workspace of another monitor (BEHAVIOUR).** With two displays, an empty workspace on the second display and the pointer over it while the first display is focused: `komorebic focus-workspace 1`, `komorebic focus-workspaces 1` and `komorebic focus-last-workspace` first focus the display under the pointer, then switch its workspace (before, `focus-workspace` and `focus-workspaces` acted on the focused display). With the pointer on the focused display nothing changes.
|
||||
Reference in new issue
Block a user