pub fn frontmost_bundle_id() -> Option<String>Expand description
Return an opaque string identifying the currently frontmost application.
On macOS this is the bundle identifier, e.g. "com.microsoft.VSCode".
On Linux (X11 / XWayland) this is the WM_CLASS class component,
e.g. "Code" or "Firefox". Pure Wayland windows (not running under
XWayland) are not visible through this path and return None. On Windows
this is the lower-cased executable path of the foreground process.
None when no app is frontmost, when reading fails, or on unsupported
platforms. Costs one X11 round-trip on Linux, four objc_msgSends on
macOS — well under a millisecond at the 1 Hz polling cadence in
openlogi-gui::app_watcher.