Repository navigation
Conversation
xdg-settings does not know Hyprland and probes for XFCE with xprop, so the menu's check of the default browser starts Xwayland at login. Read it with omarchy-cmd-default-browser, like the browser launchers do. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
[Medium impact] No new blocking issue was found in the reviewed changes. SummaryThe browser lookup now asks both fallback commands as
Reviews (4) · Last reviewed commit: "Test the X-Generic fallback in the defau..." · Reviewed by Greptile |
Without a default in a config dir, omarchy-cmd-default-browser asks xdg-settings, which probes for XFCE with xprop. Ask it as X-Generic, which takes the same generic path without the probe. The default-apps test now covers the direct lookup and the fallback, and ignores the caller's XDG_CONFIG_DIRS. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Tested on commit Background & Root Cause Verification
Automated & Runtime Tests
Clean, direct fix.
|
|
Nice, and the X-Generic fallback is a neat way to dodge the xprop probe. Two nits: |
|
Nits from the earlier LGTM still open when you have a minute: (1) |
|
Reviewed at Reproduction, on a stock Omarchy worker. I put an Tests on the worker. Second opinion. Codex Medium reviewed it over two rounds and found nothing that blocks it. It did raise one narrowing, which I reproduced. When no config dir names a default, the fallback now runs as Related: #14441 changes other parts of the same two scripts and does not compete with this one. This now waits on the maintainer. |
quattro now reads the default browser through omarchy-cmd-default-browser on its own, so omarchy-default-browser takes quattro's version. What this branch still adds is the fallback: quattro asks xdg-settings with XDG_CURRENT_DESKTOP empty to keep it off hyprland-mimeapps.list, and xdg-utils answers an empty desktop by probing with dbus-send and xprop before settling on the generic path. X-Generic reaches the same generic path directly, and reads x-generic-mimeapps.list, which nothing writes, so it keeps the list skipped without the probe. The omarchy-browser.desktop guards from quattro stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This stopped merging cleanly after #14441 landed on Checked on an Omarchy ISO worker under Hyprland, with no http default in a config dir so the fallback runs: Codex Medium reviewed the merged head and agreed on the mechanism, the tests and that the merge kept both sides; that is agreement, and its independence is not guaranteed. It noted that in an XFCE session, xdg-utils with an empty desktop would read XFCE's own helper file where Nothing is left for you here; it waits on the maintainer. |
omacom#16422 reworked the xdg fallback in omarchy-cmd-default-browser to accept only an installed answer and fall back to mimeinfo.cache. Keep that, and ask both xdg-settings and xdg-mime as X-Generic as this branch does.
|
This stopped merging cleanly again after #16422 landed on Checked on an Omarchy ISO worker under Hyprland, at the merged head, in three cases: no http default in a config dir, a Codex Medium and muse-wonder (High) reviewed the merged head and found no defect. Both agreed the merge drops nothing from either side. That is agreement, and their independence is not guaranteed. muse-wonder also pointed out that @hegjon, two things are out of date since #14441, and both are yours to change if you agree:
After that, the maintainer decides whether to take it. On stock Hyprland it saves only the four |
The mimeapps.list case in default-apps-test covered what omacom#14441 already landed, and default-browser-lookup-test covers that lookup. Assert the X-Generic fallback there instead, where the environment is already isolated, and leave default-apps-test as it is on quattro. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, both points are fixed in e6fbd01.
You're right that on stock Hyprland this saves only the With lazy start, Xwayland would stay off until an X11 program actually runs. On my X200 with Hypoland, that saves about 150 ms of CPU and 31 MiB at login. On this machine's Hyprland, Xwayland is using 69 MiB. So this PR is a small cleanup on its own, but it's also groundwork for that change. |
|
@hegjon, e6fbd01 makes both changes from the last round. The description now covers only the Codex Medium and muse-wonder (High) reviewed this head and found no defect. That is agreement, and their independence is not guaranteed. Both noticed one thing I confirmed: nothing tests the The classification is unsettled at this head. I classified it as a bug, an unneeded probe in the fallback. Codex Medium classified it as an enhancement: the description now presents it as saving work at login, and as groundwork for a lazy Xwayland start. Both readings are reasonable, so it carries no |
When nothing is set in a config dir,
omarchy-cmd-default-browserfalls back toxdg-settingsandxdg-mime, asking withXDG_CURRENT_DESKTOPempty. xdg-utils doesn't know an empty orHyprlanddesktop, so it probes for XFCE withxprop -root, twice inxdg-settingsand twice more in thexdg-mimeit calls. The menu runs this lookup at login to check Defaults > Browser:Both fallback calls now ask as
X-Generic, which xdg-utils knows, so they skip the probe. Like the empty desktop, it skips the desktop-specific list, which points atomarchy-browser.desktop. Everything else in the fallback is unchanged: both answers still have to passinstalled(),xdg-mimestill runs whenxdg-settingsnames a browser that is gone, and themimeinfo.cachefallback stays.default-browser-lookup-test.shnow checks that the fallback asksxdg-settingsasX-Generic. That check fails without this change.Measured on a ThinkPad X200 (Core 2 Duo) running Hypoland, a Hyprland fork for OpenGL ES 2.0 GPUs, where I found it:
xpropstarted it. This removes one of the two things that start Xwayland at login in an Omarchy session. The other one is fcitx5's X11 addons (xim,xcb). With both gone, Xwayland starts only when an X11 program runs, which saves 150 ms of CPU and about 31 MiB at login.xpropcalls (and thedbus-sendcalls xdg-utils makes alongside them).Tests:
default-browser-lookup,default-apps,browser-env,launch-browserandmenu-guardspass.🤖 Generated with Claude Code