From d4d13e616cb15ef22479d9cb97922af93317a01a Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Tue, 13 Oct 2026 17:05:59 +0300 Subject: Add desktop services: open URI, notify, appearance, bell, and paths wsap_term keeps per-platform code for opening links, notifications, the bell, high-contrast detection, the executable and bundle paths, and the default locale. These now live behind . On Linux, src/platform/freedesktop serves both backends. Opening a URI runs xdg-open from PATH through a double fork, so the opener gets default signal dispositions, an empty mask, a new session, and none of the application's descriptors. Notifications and the Settings portal use the session bus through libdbus-1, an optional dependency behind -Ddbus. Appearance falls back to GTK_THEME without a portal. The bell uses xdg-system-bell on Wayland and the XKB bell on X11. Cocoa implements the same calls with NSWorkspace, UserNotifications, the effective appearance, NSBeep, the bundle, and CFLocale. That code is not built or run here; it needs a macOS check. The desktop test runs under dbus-run-session against a fake notification server and portal, and uses a fake xdg-open to check argument passing, signal state, and descriptor inheritance. Co-Authored-By: Claude Opus 5.5 --- docs/getting-started.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docs/getting-started.md') diff --git a/docs/getting-started.md b/docs/getting-started.md index 73af4ab..5e569fe 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -20,7 +20,8 @@ Use a C23 compiler, Meson 1.6 or newer, and Ninja. GCC and Clang can build the l | --- | --- | | Wayland | `wayland-client`, `wayland-cursor`, `xkbcommon` | | X11 | `x11`, `xi`, `xkbcommon`, `xext`; optional `xrandr` | -| Cocoa | macOS 14+ SDK with AppKit, Metal, and QuartzCore; Metal-capable device | +| Linux desktop services | Optional `dbus-1` for notifications and appearance | +| Cocoa | macOS 14+ SDK with AppKit, Metal, QuartzCore, and UserNotifications; Metal-capable device | ```sh meson setup build @@ -32,6 +33,7 @@ meson test -C build --print-errorlogs Each Linux backend defaults to `auto`, meaning build it when its dependencies are available. Require one with `-Dwayland=enabled` or `-Dx11=enabled`; omit one with `-Dwayland=disabled` or `-Dx11=disabled`. At least one backend is required. +`-Ddbus` works the same way for the optional D-Bus desktop services. Cocoa is selected on macOS and requires no extra third-party dependencies. Its minimum deployment target is macOS 14. Set `MACOSX_DEPLOYMENT_TARGET=14.0` (or newer) before configuring if your toolchain defaults to an older target. -- cgit v1.2.3