20 Commits

Author SHA1 Message Date
LGUG2Z
529d93595e chore(deps): cargo update 2026-03-21 12:38:45 -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
bed314b866 chore(release): v0.1.40 2026-02-14 12:52:25 -08:00
LGUG2Z
5d7a0ea9ad chore(deps): cargo update 2026-02-12 20:35:29 -08:00
LGUG2Z
fed09689b8 chore(deps): cargo update 2026-02-04 08:43:43 -08:00
LGUG2Z
ab528f799d chore(deps): cargo update 2026-01-13 08:26:22 -08:00
LGUG2Z
1cb8ed7f10 chore(deps): bump schemars to 1.1 2025-12-21 16:26:25 -08:00
LGUG2Z
ce4479eb9f chore(deps): cargo update 2025-12-16 18:05:51 -08:00
LGUG2Z
309bfdfee1 chore(deps): update dependencies.json 2025-12-09 16:55:47 -08:00
LGUG2Z
c8c4c3507c chore(deps): handle egui-related upgrades 2025-11-12 16:20:19 -08: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
e33a5f28f0 chore(deps): bump windows-rs 2025-10-07 09:43:39 -07:00
LGUG2Z
1c23439f95 chore(deps): bump egui and eframe to 0.32 2025-09-30 18:30:04 -07:00
LGUG2Z
539aeec965 refactor(rust): remove getset dependency 2025-09-20 14:34:19 -07:00
LGUG2Z
78177af6b8 docs(mkdocs): run docgen, depgen and jsonschema targets 2025-09-09 08:56:29 -07:00
LGUG2Z
00384ce333 chore(release): v0.1.37 2025-05-17 11:44:55 -07:00
LGUG2Z
70f561e6ac feat(shortcuts): add helper written in egui
This commit adds a simple egui helper application which shows a list of
shortcuts defined in a user's whkdrc file. Parsing AHK files is not
supported.

In addition to listing out shortcuts defined in the whkdrc file, the top
line allows users to add filter a filter to narrow down the list of
commands and key bindings to the ones they are interested in.

A new komorebic command "toggle-shortcuts" has been introduced which
will first attempt to kill "komorebi-shortcuts.exe", and then exit if
the kill signal was successful (ie. a process was closed), or proceed to
open "komorebi-shortcuts.exe" if the kill signal was not successful (ie.
no process was closed, so we should open one).

"komorebi-shortcuts.exe" has been added as a floating application in
lib.rs to allow for users to use the "komorebic move" command to
manipulate its position via their existing keyboard bindings.
2025-05-07 08:52:08 -07:00
LGUG2Z
ee89b344df chore(deps): update dependencies.json 2025-05-04 11:38:03 -07:00
LGUG2Z
d146f35c25 chore(deps): cargo update 2025-04-12 10:52:31 -07:00
LGUG2Z
e4f9d8af86 chore(deps): add deny.toml and dependencies.json 2025-03-06 15:34:27 -08:00