Skip to content

Fix bitwarden floating window config on other chromium browsers - #7628

Closed
Jacob-Roberts wants to merge 4 commits into
omacom:quattrofrom
Jacob-Roberts:omarchy-bitwarden-all-browsers-floating
Closed

Jacob-Roberts wants to merge 4 commits into
omacom:quattrofrom
Jacob-Roberts:omarchy-bitwarden-all-browsers-floating

Conversation

@Jacob-Roberts

@Jacob-Roberts Jacob-Roberts commented Aug 20, 2026 •

Copy link
Copy Markdown

This config will make the floating window configuration work on other non-default chrome browsers.

Tested on all chromium based browsers (including ms edge)

Before

screenshot-2026-08-20_12-

After

(Screenshot tool intentionally redacted the contents, but it is working)

screenshot-2026-08-26_16-43-59

Note

This only fixes it for chromium based browsers. The Firefox selector doesn't work because the class is just "firefox". Will leave as an opportunity for someone else to fix.

Copilot AI balanced review requested due to automatic review settings August 20, 2026 19:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Extends Chromium browser and Bitwarden window matching to additional browser identities.

Changes:

  • Recognizes Brave’s alternate window class.
  • Expands Bitwarden extension matching across Chromium-based browsers.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
default/hypr/apps/browser.lua Adds bare Brave window-class matching.
default/hypr/apps/bitwarden.lua Broadens Bitwarden extension window matching.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread default/hypr/apps/bitwarden.lua Resolved
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed on a disposable VM running Hyprland 0.56.2 with this branch loaded as $OMARCHY_PATH, so the rules below were exercised by the compositor rather than read off the diff.

The change is right and it works. Hyprland matches match.class with RE2::FullMatch (CRegexMatchEngine::match), so matching is anchored: the old literal chrome-nngceckbapebfimnlniiiahkandclblb-Default covered Chrome and Chromium only, and the new alternation cannot over-match — the only classes [bB]rave(-browser)? newly matches in browser.lua are exactly brave and Brave. Opening a window per candidate class and reading hyprctl clients on this branch (<id> = the extension id):

class gets floating-window
chrome-<id>-Default yes
chromium-<id>-Default yes
brave-<id>-Default yes — no before this PR
brave-browser-<id>-Default yes — no before this PR
helium-<id>-Default yes
microsoft-edge-<id>-Default yes
Vivaldi-stable-<id>-Default yes
msedge-<id>-Default no
vivaldi-stable-<id>-Default no
brave-origin-<id>-Default no
chrome-<id>-Profile_1 no

In browser.lua, classes brave and Brave now get chromium-based-browser where they did not before, and nothing else newly matches.

Two of the browsers in the alternation are probably still uncovered, because the list was copied from browser.lua, which holds main-window classes, while the pop-out class is built from the browser's process name — the same mismatch you found on Brave (main window brave-browser, pop-out prefix brave).

  • Edge: its process is msedge (bin/omarchy-theme-set-browser:40), so the pop-out is most likely msedge-…-Default, which [mM]icrosoft-edge cannot match. Separately, Bitwarden on the Edge add-ons store carries a different extension id (jbkfoedolllekgbhcbcoahefnbanhhlh), so even the right prefix would miss unless the user installed the Chrome-store build. Issue Microsoft Edge exposes extension popups and tooltips as anonymous Hyprland windows #7569 reports the Edge pop-out landing in the layout as a pane, which is what no matching rule looks like.
  • Vivaldi: the pop-out prefix is lowercase (vivaldi-…), while Vivaldi-stable with a capital V matches nothing under full-match semantics.

Both are one command to confirm if you have those browsers: open the pop-out and run hyprctl clients -j | jq -r '.[].class'. I did not push a guess at either, because I have no Edge or Vivaldi install to verify the class against.

Two pre-existing limits this PR inherits rather than introduces, noted so they are not lost: the rule only matches the Default profile (a second Chrome profile gives -Profile_1), and brave-origin — installable from Omarchy's own menu — still misses the chromium-based-browser tag in browser.lua.

Tests: ./test/shell.d/hyprland-default-config-test.sh passes on the worker (14 passed, 0 failed). It loads every default/hypr/apps/*.lua, so the files parse; no test covers rule matching, which is why the table above was measured on a live compositor instead.

A second reviewer (codex at xhigh) went over the same diff and agreed on the full-match semantics and that the Brave broadening is safe — its independence is not currently guaranteed, since it can read this machine. It contributed the Edge extension-id point and the non-default-profile limitation on its own.

Nothing was pushed to your branch. This is waiting on the maintainer, with one thing worth flagging there: #6449 rewrites the same rule in bitwarden.lua, dropping +floating-window for max_size to fix the forced 875x600 in #6075. The two will conflict textually, and this PR extends today's 875x600 sizing to Brave users as well.

@Jacob-Roberts

Copy link
Copy Markdown
Author

@omarchybot re-review

@omarchybot

Copy link
Copy Markdown
Collaborator

Re-reviewed at 1bebb50c on a disposable VM running Hyprland 0.56.2 with this branch loaded as $OMARCHY_PATH, so what follows was measured by the compositor rather than read off the diff. Only the new commit is covered — everything up to 5a9be67f was reviewed in the previous pass.

The commit does two things, and both hold up: it replaces the Edge arm (microsoft-edge plus the Chrome Web Store id, which I flagged last time as probably wrong on both counts) with msedge plus the Edge Add-ons id, and it swaps tag = "+floating-window" for float / no_blur / max_size = "480 650".

One window opened per candidate class, read back from hyprctl clients:

class floats
chrome-<chrome-id>-Default yes, 480 wide
brave-<chrome-id>-Default yes, 480 wide
Vivaldi-stable-<chrome-id>-Default yes, 480 wide
msedge-_<edge-id>-Default yes, 480 wide
msedge-<chrome-id>-Default no
microsoft-edge-<chrome-id>-Default no
vivaldi-<chrome-id>-Default no
chromium-<chrome-id>-Default no
brave-<chrome-id>__popup_index.html-Default no
chrome-<chrome-id>-Profile_1 no
chromium (an ordinary browser window) no
chrome-example.com__-Default (an Omarchy webapp) no

max_size is a real rule key and the string form is right: Hyprland's Lua binding table maps max_size to the same expression-vec2 parser as size (LuaBindingsInternal.hpp), which takes either a { 480, 650 } table or a "480 650" string. The matched windows came up capped at 480 wide and hyprctl configerrors was empty, which is worth stating because default/hypr/windows.lua requires the apps directory unprotected — a Lua error in bitwarden.lua would take out every rule file sorted after it, browser.lua included.

Dropping the tag also drops center = true from system.lua, and that turns out not to matter: the pop-out came up at x=400 on a 1280-wide output, centred by Hyprland's own placement for floating windows.

Narrowing (google-)?[cC]hrom(e|ium) to [cC]hrome is safe, despite how it reads. Arch's Chromium prefixes its app windows with chrome, not chromium — chromium --app=https://example.com on the VM produced chrome-example.com__-Default — which is also the class #6075 reports for the Bitwarden pop-out under Chromium. Dropping [bB]rave-browser is likewise fine; the pop-out prefix is plain brave, as you found.

Three gaps remain, none of them introduced by this commit:

  • Edge with the Chrome Web Store build of Bitwarden is not matched. Edge accepts extensions from the Chrome store, so it is the same browser reached by a different install path, and Microsoft Edge exposes extension popups and tooltips as anonymous Hyprland windows #7569 does not say which one its reporter used.
  • Vivaldi is still Vivaldi-stable; the pop-out prefix looks lowercase, so that arm probably matches nothing. I have no Vivaldi to confirm it, and it is not a browser omarchy install browser offers, so it may not be worth chasing.
  • The rule covers only the Default profile, and not the …__popup_index.html-Default class variant reported on Brave in Fix Bitwarden extension popout rendering #8341.

Second opinion: codex at xhigh reviewed the same commit. It contributed the max_size binding above, which settles the string-versus-table question on its own terms, and the Chrome-Web-Store-on-Edge gap; its independence is not currently guaranteed, since it can read this machine. It also called the Chromium narrowing a high-severity regression, which the measurement above disproves.

Nothing was pushed to your branch. No automated test covers rule matching — test/shell.d/hyprland-default-config-test.sh stubs window_rule, so it only proves the files parse — which is why the table was measured on a live compositor.

This is waiting on the maintainer, who now has four open pull requests on this one rule. This commit makes #6449 redundant: its property block is byte-identical here. #8236 and #8341 take the other approach, matching .*nngceckbapebfimnlniiiahkandclblb.*, which covers every browser prefix, every profile and the popup-path variant, but only the Chrome Web Store id — so they miss Edge's own build exactly where this one catches it. No open PR covers both, and which to take is the maintainer's call.

@bjarneo

bjarneo commented Sep 21, 2026

Copy link
Copy Markdown
Member

Automated duplication check: this pull request looks similar to #8341, which covers the same Bitwarden browser match. I keep that one open and close this one to consolidate review.

If you feel this is the wrong decision, please open the PR again with a note on the difference.

@bjarneo bjarneo closed this Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants