Commit Graph
125 Commits
Author SHA1 Message Date
LGUG2Z 072ba7a471 chore(repo): merge the kfm clippy fixes into the package migration line
wip-u-kfm carries the macOS clippy fixes (&Path, drain, filter, slice fill, sort_by_key, collapsible_match allows, capture_spike, bar stroke literals). The bar stroke literal revision touches komorebi-for-mac/komorebi-bar, which the migration moved to komorebi-bar/src/macos; conflicts are resolved here by applying the same edit at the new paths.
2026-11-05 10:30:05 -08:00
LGUG2Z 29bdd0b2c7 docs(macos): record that the Mini runs so far are compile and unit tests only
Adds a status section to the hand-check list: cargo test --workspace passed
on the Mini (daemon 366 passed, 1 ignored) and clippy is clean, but nothing
was run as a daemon, so every walk-through item stays open.

Verified: documentation only.
2026-11-05 10:30:05 -08:00
LGUG2Z c23569a337 docs: macOS commands name komorebi-macos, not komorebi
The Mac Mini run failed on -p komorebi: the daemon packages are komorebi-macos and komorebi-windows (the
single komorebi package is step 8). Corrected the command list and the note.
2026-10-31 12:53:29 -07:00
LGUG2Z 75688cf74f docs: bar steps B0-B3 done; what to run on the Mac Mini
Marks the bar steps as executed (B4 left, why), and lists the cargo build, clippy, test and schema commands
for aarch64-darwin per revision. Not verified: any of them on a Mac.
2026-10-31 12:45:37 -07:00
LGUG2Z a73c9e2131 docs: state of the package migration (steps 0-6), the bar steps, the owed gates
Updates docs/dev/unified-binaries.md: steps 5 and 6 done, the limits found, step 7 for the bar written as
exact steps (B0-B4, not executed; bar files untouched), and the list of heavy builds, VM, e2e and Mac
checks the coordinator owes. Not verified: any nix build.
2026-10-31 12:35:48 -07:00
LGUG2Z 5660ad8f02 docs: record the state of the package migration (steps 0-4 done)
Adds the state, the measured cache isolation after the workspace merge and the limits found (stubbed
source is read at evaluation, so other systems' attributes need their own builder; deny/fmt/taplo of the
merged workspace unbuilt; steps 5 and 6 left for the cutover). Not verified: any nix build.
2026-10-31 12:10:04 -07:00
LGUG2Z 12870fa533 chore(repo): base for the package migration
Merge of wip-stage (kfde, bar, settings), wip-cand1 (kfw, kfm), wip-u-nix and wip-u-pkg (the
unified-binaries doc), so the migration is built on the open stacks and does not conflict with them later.
2026-10-31 11:31:14 -07:00
LGUG2Z 374269646e docs: unified komorebi, komorebic and komorebi-bar packages (layout, migration order, risks)
Records the spike (revisions on wip-u-pkg-spike, nothing landed on wip-main): one root
workspace holds the Windows, KDE and macOS crates with one Cargo.lock (+41 packages), the
unified komorebic builds on all three targets, KDE tests pass unchanged except one test
that reads the package name. Recommends komorebic and bar as one crate with cfg(target_os)
modules and the daemon as three gated libraries behind one thin binary, lists the migration
order, risks, gates (compile, S oracle, nix, e2e, KDE VM, Mac hand check) and the file moves
that conflict with the open wip-u-* stacks.

Verified: Windows cargo check -p komorebic, KDE check and 879 of 880 tests, macOS fake-CC
check, all on the spike tree. Not verified: nix builds, e2e, VM, any macOS link or run.
2026-10-31 11:27:53 -07:00
LGUG2Z 1b3b33fb2c chore(repo): combine the kfde, bar and settings stacks (staging)
Staging merge of three stacks that make no runtime change on Windows or KDE: the KDE Backend/Container/process_command refactors (wip-u-kfde), the shared bar core moves (wip-u-bar) and komorebi-settings with the S1/S2 pins (wip-u-settings). Conflicts, if any, are resolved here. Not yet gated: the KDE VM suites and the Windows bar check are owed.
2026-10-31 11:25:59 -07:00
LGUG2Z 0a823eec94 docs(settings): inventory of the process-wide statics and the Settings design
Measured on wip-main 633e7453 by grep and reading: 126 (Windows), 53 (KDE)
and 74 (macOS) static declarations, of which 61/35/36 are configuration and
51/29/28 are written by apply_globals. The document has the per-static
table (type, writers, readers, shared or platform, matching name), the lock
order of the rule lists, the proposed Settings (shared part plus a platform
type parameter, snapshot reads, serialised updates, scoped override), the
statics whose semantics would change (reload merges rather than replaces;
partial updates visible mid-reload; save-and-restore writes; the empty
WORKSPACE_MATCHING_RULES window), the migration order with pure refactor
versus BEHAVIOUR marks and the gate each needs, and section 7 with the
findings from encoding the semantics in the crate (aspect ratio starts at
Widescreen but a load without the key writes Standard).

Verified: nothing run (documentation); counts from grep, line numbers read
at 633e7453.
2026-10-31 11:25:26 -07:00
LGUG2Z 6a548f4f62 docs: compare the KDE and Windows core model and propose komorebi-core
docs/dev/core-model.md: per-file measured differences between the
Windows, KDE and macOS container, monitor, workspace, window and
window_manager (stripped code lines, changed lines, identical lines),
the platform-specific fields and methods of each layer, a proposed
split into a komorebi-core crate generic over a Platform (Backend plus a
Copy-or-Clone Window and a state type) with the exact order of layers
(container, monitor, workspace, window_manager, router), what the KDE
stack of wip-u-kfde already did, what Windows must do before the crate
can be created, and the list of KDE process_command arms over 20 lines
with the method each became. Measurements are from diff of the files at
this tip; nothing was run on Windows or macOS.

Verified: not applicable (documentation); the numbers were produced by
diff and wc on the files at wip-u-kfde.
2026-10-31 11:09:17 -07:00
LGUG2Z 1c3221e6b6 docs(bar): status after the config move, merged package layout, macOS hand check
docs/dev/bar-unification.md is brought up to date: what the core holds now
(4,592 lines, the hooks), what is still per platform with fresh
measurements (komorebi.rs 136 differing lines, network.rs 82, bar.rs 444,
main.rs 92, os.rs 71) and why each stays, the known macOS/Windows
differences kept on purpose (including the accept-and-skip of Windows-only
keys, D-coord-1), the proposed layout of the merged package for the
coordinator (module layout with cfg(target_os), dependencies by target,
schema flag, lock-file folding, nix), the ordered plan and the hand check
list. No code changed. The macOS hand-check section for
docs/dev/macos-handcheck.md (owned by kfm, not in this tree) is in the
scratchpad as bar-handcheck-section.md for the coordinator to append.

Verified: figures from diff on this tree. Gates at this tip: native bar-core
tests 3+6, schema harness macOS and Windows byte-identical, Windows clippy
and macOS fake-CC check clean.
2026-10-31 10:57:18 -07:00
LGUG2Z b65a32446e chore(repo): combine the kfw and kfm stacks for the e2e gate
Candidate for the Windows e2e gate: the Windows Backend switches and lock order (wip-u-kfw) with the macOS registry and Window methods (wip-u-kfm). Merge of two independent stacks that both touch crates/komorebi-backend; conflicts, if any, are resolved in this revision.
2026-10-31 10:55:01 -07:00
LGUG2Z 292a9ed567 docs(windows): record which call sites go through backend()
docs/dev/backend-switch.md now has the table of what is switched (focus,
set_rect with top = false, frame reads, plain hide/restore, minimize,
close, raise, maximize), what is left in the Windows crate on purpose
(top = true set_position, the *_with_border calls, transition and ghost
machinery, set_opacity: border and animation subsystems are platform-owned,
seam.md rule 5), and, for each query not switched (foreground_window,
cursor_pos, monitors, window, monitor_from_point), what the trait would
need so step 9 can decide.

Docs only.
2026-10-31 10:33:38 -07:00
LGUG2Z f5a299aa9e refactor(windows): minimize, close and raise go through backend()
process_command (close and minimize of the foreground window, four raise
calls) and monitor_reconciliator (four minimize calls) now call
backend().close/minimize/raise. WindowsBackend runs Window::close,
minimize and raise unchanged (minimize still leaves komorebi-bar alone).
docs/dev/backend-switch.md now holds the full table of what is switched
and what is left, including why the queries (window_rect,
foreground_window, cursor_pos, monitors) were NOT switched: each would drop
an error that callers use or report, or fabricate a default.

BEHAVIOUR: a dead window is skipped by an IsWindow check first; minimize
results are ignored as before. e2e gate needed: commands, monitor
reconciliation (monitor_reconciliator), lifecycle. Verified: Windows clippy
-D warnings via tools/fast-check PASS; e2e not run.
2026-10-31 10:22:41 -07:00
LGUG2Z 078bdc1666 refactor(windows): focus goes through backend()
Switch the 40 Window::focus(mouse_follows)? call sites in process_event,
process_command, workspace, window_manager, focus_manager and the
stackbar click to backend().focus(WindowId::from_hwnd(..), mouse_follows).
WindowsBackend::focus runs Window::focus, so the deferral while a window
slides in, the already-foreground shortcut and the cursor centring are
unchanged. animation/transition.rs:534 stays on Window::focus (it is the
code Window::focus defers to). docs/dev/backend-switch.md records what is
switched.

BEHAVIOUR: a dead window now fails early with Error::WindowGone (before:
the Win32 error from raise_and_focus_window) and a failed focus of a window
that died meanwhile reports WindowGone; every caller uses ? or ignores the
result. e2e gate needed: commands, focus, focus_follows_mouse, stacking,
workspaces, lifecycle. Verified: Windows clippy -D warnings via
tools/fast-check PASS; e2e not run.
2026-10-31 10:22:40 -07:00
LGUG2Z e7cf89d8f5 docs(bar): the plan for one komorebi-bar, with measured blockers
docs/dev/bar-unification.md: why config.rs, bar.rs and komorebi.rs are not
moved yet, file by file with the measured difference (differing lines and
hunks), the structural blocker (two Cargo workspaces/lockfiles/flakes, two
komorebi-client crates), the schema views that settle schema.bar.json, the
ordered plan, KDE (no bar exists), the macOS commands that spawn cmd.exe or
explorer.exe and are preserved in os.rs, and what must be checked by hand on
Windows and on a Mac.

Verified: figures from diff on this tree; no code changed. Gates at this
tip: schema harness macOS and Windows byte-identical, native bar-core tests
3+5 passed, Windows clippy and macOS fake-CC check clean.
2026-10-31 10:22:30 -07:00
LGUG2Z ec0d3923e5 docs(macos): add the id registry revisions to the hand-check list
Adds the three BEHAVIOUR-relevant registry revisions (registration and
forgetting, native-tab sync) with what to look for on a Mac, the mechanical
ones to section B, and a status entry in the bug list saying what of step
11(ii) is done and what is deliberately not (animator lanes, borders,
reaper/live-resize timeouts, the model holding bare ids).

Verified: documentation only.
2026-10-31 10:12:30 -07:00
LGUG2Z f157aa34e9 docs(macos): the hand-check list for a real Mac
Lists what must be checked on a Mac once the unified binaries exist: every
macOS revision that changes runtime behaviour (the rule-list lock order,
the shared command listener, pause filter, subscriber push, EventChannel,
SocketMessage, animation prefix, StaticConfig, komorebic launcher, bar-core
hooks and library bumps), the mechanical Step 6/11(i) revisions of this
stack, the walk-through the plan names (focus, move, stack, workspaces,
scrolling, pan, borders, animations, display change, sleep and wake), and
the bugs noticed: the main-queue/WM-lock deadlock of seam.md 3.3, cmd.exe
and explorer.exe in the macOS bar, the update widget's wrong repo, the raw
AX sites that remain outside Window.

Nothing in it was run: macOS cannot be built or tested on this host.
Verified: documentation only.
2026-10-31 10:03:24 -07:00
LGUG2Z 7260c9f772 docs(seam): findings from the 7c adapters (section 9)
Appends section 9 to docs/dev/seam.md: for each method of the shared Backend, what WindowsBackend and MacosBackend do and where that differs from what the daemon calls today (windows() and macOS's registry cannot be written faithfully; set_rect on Windows drops the top flag and keeps animation and guards; hide/restore results are ignored on Windows; macOS hide needs a corner and a display; raise on macOS also focuses; macOS monitors() has to be a main-thread-refreshed cache; set_opacity on Windows is the plain write). Concludes that the trait did not have to change and records three proposals (rect as Option, hide's hidden inputs, windows() as start-up operation).

Verified: docs only, not built. Every claim is by reading the code while writing the adapters; what could not be settled by reading is marked 'not verified' in the text.
2026-10-31 01:37:54 -07:00
LGUG2Z 72dc31452f docs(komorebic): regenerate the pages of the fifteen commands whose help was unified
docs/cli of the three trees for the commands the previous revision unified, written the way each tree writes its pages: komorebi-for-kde 6 pages (colour/behaviour spelling), komorebi-for-mac 7 (the shorter scrolling descriptions), the Windows tree 2 (eager-focus, promote-focus). The Windows docs/cli is otherwise stale (older clap output, three pages missing; found in step 4 prep) and the other pages are left alone.

Verified: the KDE pages are byte-identical to komorebic docgen (166 of 166 against the real binary); the macOS and Windows pages are the docgen-all output with the same page transform that made 158 of 158 macOS pages identical before. Diffs are two-line spelling or description changes (see the previous revision).
2026-10-31 01:37:54 -07:00
LGUG2Z dcadd9aa84 docs(seam): the seven consequences, restated and corrected, and the unverified list
Adds section 7 (the seven consequences of plan step 7, each with its supporting citations and a status: CONFIRMED, CORRECTED or TARGET; plus three findings the plan did not list: a batch/transaction scope, the workspace methods that exist only on KDE, and error-type differences) and section 8 (everything not confirmed, with how to confirm it on a Mac, a Windows guest or by reading). Verified against the citations of sections 2 to 6 on wip-main aa52fdc4d9e5. Not verified: see section 8.
2026-10-31 01:37:53 -07:00
LGUG2Z 2f8f839b4f docs(seam): events and the set_rect contract
Adds section 6: event sources per platform and how they reach the window manager (references the step 5 prep entries rather than redoing them) and the evidence for the 'set_rect returns once requested, the frame is observed later' contract: KDE queued commands with an optimistic table write, macOS arrival.rs, settle.rs and animator verification, Windows live_resize settling. Verified against wip-main aa52fdc4d9e5: K/kwin/mod.rs, K/kwin/state.rs, K/window_manager_event_listener.rs, K/backend/mod.rs, M/arrival.rs, M/settle.rs, M/animation/animator.rs, M/window.rs, M/window_manager_event_listener.rs, W/winevent_listener.rs, W/windows_callbacks.rs, W/live_resize.rs. Not verified: any runtime ordering of events.
2026-10-31 01:37:53 -07:00
LGUG2Z 2f1fb7826c docs(seam): window identity and coordinate conventions
Adds sections 4 (identity: id types per platform, what acting on a macOS window from a bare id would need, where each tree keeps per-window platform data, HWND width including an observation of 440 distinct HWNDs from the Windows guest logs) and 5 (coordinates: Rect convention, origin and y direction, DPI and scale handling, shadow and frame compensation, and where each conversion lives). Closes two plan items: Windows HWND width and macOS Retina points versus pixels. Verified against wip-main aa52fdc4d9e5: komorebi-layouts/src/rect.rs, W/window.rs, W/windows_api.rs, W/lib.rs, K/kwin/state.rs, K/kwin/bridge.js, M/window.rs, M/application.rs, M/macos_api.rs, M/core_graphics/mod.rs, M/core/rect_ext.rs, M/border_manager/border.rs, M/animation/ghost.rs, M/animation/capture.rs, and ~/e2e-w0 logs read-only for the HWND range. Not verified: HWND width as a Microsoft guarantee, AX values on scaled-resolution or mixed-DPI displays, negative monitor origins on Windows.
2026-10-31 01:37:53 -07:00
LGUG2Z ebf9679b95 docs(seam): macOS thread table, main-queue dispatches and the possible deadlock
Adds section 3.3: the macOS main thread (AppKit and CFRunLoop loop, what runs there), every other thread with its locks, every DispatchQueue::main exec_sync/exec_async/blocking-channel site with file:line and whether the main-side closure takes the window-manager lock, and a precise statement of the possible event-thread/main-thread deadlock, marked by reading, not reproduced. Verified against wip-main aa52fdc4d9e5: M/main.rs, M/macos_api.rs, M/monitor_reconciliator.rs, M/border_manager/{mod,border,ns_window}.rs, M/animation/{animator,ghost}.rs, M/process_event.rs, M/process_command.rs, M/reaper.rs, M/settle.rs, M/workspace_reconciliator.rs, M/window.rs, M/application.rs, dispatch2-0.3.1/src/queue.rs. Not verified: that NSWorkspace and CG display callbacks arrive on main (Apple behaviour), that CFRunLoopAddSource from a non-main thread is safe, that AXUIElement is thread-safe (the code asserts Send+Sync), and the deadlock itself (needs a Mac).
2026-10-31 01:37:53 -07:00
LGUG2Z 568881a955 docs(seam): thread tables for KDE and Windows
Adds sections 3.1 (KDE) and 3.2 (Windows): every thread that exists, what it locks, and which threads call the platform API. Closes two items the plan listed as unverified: which threads call backend() in KDE (traced: main at start-up and stop, the event thread, command threads, the monitor reconciliator and its settle thread, and tests through with_backend; never the KWin bridge or the hotkey threads) and which threads call WindowsApi, with the thread-affine subset. Verified against wip-main aa52fdc4d9e5: K/main.rs, K/kwin/mod.rs, K/kwin/hotkeys.rs, K/process_event.rs, K/process_command.rs, K/monitor_reconciliator.rs, K/backend/mod.rs, W/main.rs, W/winevent_listener.rs, W/windows_callbacks.rs, W/border_manager, W/stackbar_manager, W/animation, W/live_resize.rs, W/reaper.rs. Not verified: Microsoft's documented behaviour of WINEVENT_OUTOFCONTEXT and cross-thread SetWindowPos, and every Windows call chain (the table lists thread entry points and the API each reaches, not every path).
2026-10-31 01:37:53 -07:00
LGUG2Z 0108f8edac docs(seam): operation table and platform-subsystem table
Adds section 2: the operation table (one row per operation present on at least two platforms: KDE Backend method | Windows | macOS | semantic differences), the platform-subsystem table, and the re-measured counts with the exact method. Verified against wip-main aa52fdc4d9e5: K/backend/mod.rs, K/kwin/mod.rs, W/windows_api.rs, W/window.rs, M/macos_api.rs, M/window.rs, M/core_graphics/mod.rs, M/lib.rs. Not verified: how each AX call behaves against real applications (needs a Mac), and the counts are of source text, not of executed calls.
2026-10-31 01:37:53 -07:00
LGUG2Z 22c814e1b6 docs(seam): purpose, how to read it, and corrections to earlier claims
Creates docs/dev/seam.md with sections 1 (purpose and how to read) and the corrections list. Verified against wip-main aa52fdc4d9e5 by reading K/backend/mod.rs, K/kwin/mod.rs, K/kwin/state.rs, M/macos_api.rs, M/window.rs, M/arrival.rs, M/process_event.rs, M/process_command.rs, W/windows_api.rs. Counts quoted here are measured in the next revision. Not verified: any runtime behaviour (the document is reading-only).
2026-10-31 01:37:53 -07:00
LGUG2Z a65b5c231e feat(komorebic): pan the Scrolling layout with the fingers on a touchpad
komorebic pan --stream reads the gestures of fingers on a touchpad from standard input, as
whkd writes them for a swipe of three or four fingers (docs/gesture-stream.md in its
repository): a line for each begin, move, end and cancel, with the distances in centimetres,
and any field or message that it does not know ignored. The row follows the fingers while they
are down, and when they lift it comes to rest with a column against an edge of the screen,
going at the speed that the times of the moves say that the fingers were. Focus goes to the
nearest column in view if the focused one is not. A gesture that is given up, or that is
not finished when the stream stops, puts the row back to what it was.

komorebic works out nothing but what it is asked to: --sensitivity multiplies the distances,
--reversed flips the way that the row goes, and --paging takes a step for every two
centimetres that the fingers go, as komorebic pan does, and not move the row with them. Moves
that wait while one is told are added up, as whkd says that they may be.

A gesture is told to komorebi on one connection, which it handles in order, as messages
that are sent on a connection each are not. With ghost movement the pictures that cover the
windows near the screen are taken when the fingers go down, a move of the fingers sets them
where the row puts the windows and does nothing else, and when the fingers lift they glide to
where it comes to rest, over the time that an animation takes, and the windows are shown. Without
it the workspace is laid out a step at a time, as it is for a drag. Ten centimetres of the
fingers move the row the width of the screen. The golden transcript of whkd and the swipes
of its demo are fixtures of the tests that read the stream.
2026-10-30 15:45:37 -07:00
LGUG2Z a63057c232 feat(komorebic): pan the Scrolling layout to the left or the right
komorebic pan <left|right> moves the view along the row of the Scrolling layout by a column
without moving focus first, and lets it come to rest with a column against an edge of the
screen. Focus goes to the nearest column on the screen if the focused one has gone off it. It
does nothing in the other layouts.

The way that the view goes is the way that focus goes for the commands that have directions:
panning to the left brings what is to the left of the screen into view, which is to move the
row to the right.

This is a command that a wheel can be bound to, as it is with whkd:
alt + wheelup : komorebic pan left.
2026-10-30 15:45:37 -07:00
LGUG2Z 730f5d82ec feat(animation): a workspace animation prefix
Workspaces are going to slide in and out of the monitor when they are
switched, and that is its own kind of animation (workspace) next to moving
and transparency: it is turned on, and given a duration and an easing, the
same way (animation.enabled, duration and style take a workspace entry, as do
komorebic animation, animation-duration and animation-style with
--animation-type workspace), with the duration and the easing of the other
animations when it has none of its own.

Animations being enabled for everything enables it too, and it can be turned
off in particular (animation.enabled with workspace set to false), so that
enabled: true keeps meaning everything. It needs ghost movement, as the
windows slide as ghosts. Nothing uses it yet.
2026-10-30 15:45:37 -07:00
LGUG2Z 5daca12e28 feat(scrolling): support more than one monitor
Remove the single-monitor restrictions on the Scrolling layout. Each
workspace keeps a strip of its own, and a window is seen on whichever monitor
it overlaps, so placement now looks at the other monitors: a window that
scrolled out of view past an edge that another monitor is next to is hidden
instead of parked, and a partly visible one is cut down to its own work area.

A window that comes back into view is shown again first, but only the one at
the front of its container: the others are the tabs at the back of a stack,
which are hidden because they are at the back.
2026-10-30 15:45:37 -07:00
LGUG2Z b8a444df5c docs(scrolling): describe the scrolling layout 2026-10-30 15:45:37 -07:00
LGUG2Z 7c79625ba7 docs(schema): regenerate the schemas for the scrolling layout
schema.json gets the center_focused_column layout option as a boolean or one
of Never, Always and OnOverflow, and schema.bar.json, which embeds the socket
messages, gets the new scrolling commands.
2026-10-30 15:45:37 -07:00
Csaba 83c4e11d99 feat(wm): add initial_window_placement_rules for workspace-level
Adds a new initial_window_placement_rules workspace configuration option
that allows users to control where new tiled windows are inserted in the
container list. Supports placement by named strategy (Primary,
Secondary, BeforeFocused, AfterFocused, Last), fixed container index, or
per-application matching rules with OR/AND logic.
2026-08-22 13:52:38 -07:00
Csaba 24c0ce0b1d feat(wm): add global layout_defaults for per-layout default options
Adds a top-level layout_defaults setting that defines default
layout_options and layout_options_rules per layout. Workspaces without
their own layout_options or layout_options_rules automatically inherit
the global defaults. If a workspace defines either setting, all global
defaults for that layout are fully replaced.
2026-05-03 10:16:20 -07:00
Csaba d6b17bbc7c feat(wm): add threshold-based layout_options_rules for workspaces
Adds layout_options_rules to workspace configuration, allowing
layout_options to dynamically change based on container count. Uses the
same threshold semantics as layout_rules: when container count >=
threshold, the highest matching rule fully replaces the base
layout_options.
2026-05-03 10:16:18 -07:00
bunnyDrug 41fc316a59 fix(docs): add missing word
Reading the documentation I came across what I think is a missing word
in this sentence.
2026-03-22 16:11:43 -07:00
Csaba ea35d818a1 feat(bar): windows systray widget
A new System Tray widget has been added to komorebi-bar, bringing native
Windows system tray functionality directly into the bar.

Special thanks to the Zebar project and its contributors for developing
the systray-util crate library that makes Windows system tray
integration possible.

The widget intercepts system tray icon data by creating a hidden "spy"
window that mimics the Windows taskbar. When applications use the
Shell_NotifyIcon API to manage their tray icons, the widget receives the
same broadcast messages, allowing it to monitor all system tray activity
while forwarding messages to the real taskbar to avoid disruption.

Users can configure which icons to hide using flexible rules. A plain
string matches by exe name (case-insensitive). A structured object can
match on exe, tooltip, and/or GUID fields using AND logic. Each field
supports matching strategies from komorebi's window rules (Equals,
StartsWith, EndsWith, Contains, Regex, and their negated variants),
allowing precise filtering even when multiple icons share the same exe
and GUID. An info button opens a floating panel listing all icons with
their properties and copy buttons, making it easy to identify which
values to use in filter rules.

The widget fully supports mouse interactions including left-click,
right-click, middle-click, and double-click actions on tray icons.
Double-click support uses the LeftDoubleClick action from systray-util
0.2.0, which sends WM_LBUTTONDBLCLK and NIN_SELECT messages. It handles
right-aligned placement correctly by adjusting the rendering order and
toggle button arrow directions to maintain consistent visual appearance
regardless of which panel the widget is placed in.

Some system tray icons register a click callback but never actually
respond to click messages, effectively becoming "zombie" icons from an
interaction standpoint. The widget includes fallback commands for known
problematic icons that override the native click action with a direct
shell command (e.g. opening Windows Security or volume settings).

The implementation uses a background thread with its own tokio runtime
to handle the async systray events, communicating with the UI thread
through crossbeam channels. Icon images are cached efficiently using
hash-based keys that update when icons change. Rapid icon updates are
deduplicated to prevent UI freezing, and image conversion (RgbaImage to
ColorImage) is performed on the background thread to keep the UI
responsive.

The widget automatically detects and removes stale icons whose owning
process has exited, using the Win32 IsWindow API on a configurable
interval. A manual refresh button is also available for immediate
cleanup.

A shortcuts button can be configured to toggle komorebi-shortcuts by
killing the process if running or starting it otherwise. The refresh,
info, and shortcuts buttons can each be placed in the main visible area
or in the overflow section.
2026-03-21 12:35:39 -07:00
LGUG2Z 5b6fab0044 chore(dev): begin v0.1.41-dev 2026-02-20 16:56:51 -08:00
Csaba 22e8a79833 feat(wm): add layout_options with ratios support
Added customizable split ratios for layouts via layout_options
configuration. Users can now specify column_ratios and row_ratios arrays
to control window sizing in various layouts.

Ratios are validated at config load time: values are clamped between 0.1
and 0.9 to prevent zero-sized windows, and arrays are automatically
truncated when their cumulative sum would reach or exceed 1.0. This
ensures there's always remaining space for additional windows.

Ratio support varies by layout:

- Columns and Rows layouts use the full arrays for each column/row width
  or height
- VerticalStack, RightMainVerticalStack, and HorizontalStack use the
  first ratio for the primary split and the remaining ratios for stack
  windows
- BSP uses the first value from each array for horizontal and vertical
  splits respectively
- Grid only supports column_ratios since row counts vary dynamically.
- UltrawideVerticalStack uses the first two column ratios for center and
  left columns.

All ratio-related values are now defined as constants in
default_layout.rs: MAX_RATIOS (5), MIN_RATIO (0.1), MAX_RATIO (0.9),
DEFAULT_RATIO (0.5), and DEFAULT_SECONDARY_RATIO (0.25 for
UltrawideVerticalStack).
2026-02-07 15:27:48 -08:00
LGUG2Z 5946caaf92 docs(quickstart): enable fewer widgets in the bar's example config 2026-02-06 17:06:36 -08:00
LGUG2Z 8805fafa99 feat(bar): make explicit monitor config optional
This commit makes the monitor configuration option for the komorebi-bar
optional, defaulting to index 0.
2026-01-04 19:15:24 -08:00
LGUG2Z ff4187aecf chore(dev): begin v0.1.40-dev 2025-12-14 14:07:44 -08:00
LGUG2Z a77b3e774a fix(docs): replace deprecated aliases in komorebi.bar.example.json
This commit ensures that we are using show_total_activity and
show_activity instead of show_total_data_transmitted and
show_network_activity in the komorebi.bar.example.json file which is
populated for users in the quickstart command.

JSONSchema is not smart enough to resolve aliases for backwards compat,
which results in confusing behaviour for new users trying to edit this
file.

fix #1596
2025-11-14 08:02:04 -08:00
LGUG2Z 416dd94670 feat(wm): promote containers by swapping indices
This commit adds a new SocketMessage variant PromoteSwap and
corresponding komorebic promote-swap command.

PromoteSwap will also promote the focused window container to the
largest tile in the layout, but instead of removing the focused
container x from the Ring and inserting it into position 0, possibly
changing the positions of other windows between 0 and x, the indices x
and 0 in the Ring will be swapped directly.
2025-11-04 08:02:07 -08:00
LGUG2Z d0ae92ca3a feat(wm): add visual feedback for preselection
This commit adds visual feedback in the form of a ghost tile for
preselections made by the preselect-direction command.

A container with the id "PRESELECT" will be added to the workspace, and
replaced when the next manage-able window is spawned.

A new command, cancel-preselect, has been added to remove both the
preselection index and the ghost tile if the user changes their mind.
2025-11-02 11:06:39 -08:00
LGUG2Z adbb6c1cb0 feat(wm): add direction preselection
This commit adds a new feature to preselect the direction of the next
spawned window with a corresponding komorebic preselect-direction
command which takes an OperationDirection.

If the OperationDirection is valid from the current position, it will be
stored in the Workspace state, and then read, applied, and deleted when
the next manage-able window is spawned.

Direction preselection does not (yet?) support the Grid layout.
2025-10-31 15:08:57 -07:00
LGUG2Z b613986474 feat(wm): add a splash screen for mdm devices
A little nudge for people to do the right thing, 1990s vibes.
2025-10-28 18:03:17 -07:00
LGUG2Z e07b464b0d chore(dev): begin 0.1.39-dev 2025-09-20 12:59:09 -07:00