From 5fcd9c93b28dd379718def0c4227773e560bceef Mon Sep 17 00:00:00 2001 From: "Adrian Gunnar Lauterer (aider)" Date: Sun, 25 May 2025 21:18:44 +0200 Subject: [PATCH] refactor: simplify window rules for Bitwarden floating behavior --- home/gunalx/niri.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/home/gunalx/niri.nix b/home/gunalx/niri.nix index 4a5b647..a575a8a 100644 --- a/home/gunalx/niri.nix +++ b/home/gunalx/niri.nix @@ -263,17 +263,14 @@ window-rule { default-column-width {} } -// Open the Firefox picture-in-picture player as floating by default. +// Floating Bitwarden extension popup windows only window-rule { - // This app-id regular expression will work for both: - // - host Firefox (app-id is "firefox") - // - Flatpak Firefox (app-id is "org.mozilla.firefox") - match app-id=r#"firefox$"# title="^Picture-in-Picture$" - match app-id=r#"firefox$"# title="^Bitwarden$" - match app-id=r#"firefox$"# title="^Extension: (Bitwarden Password Manager) - Bitwarden — Mozilla Firefox$" - match app-id="firefox" title="Extension: (Bitwarden Password Manager) - Bitwarden — Mozilla Firefox" - match app-id="Bitwarden$" - match title="^Bitwarden" + match app-id=r#"^firefox$"# title=r#"^Extension: \(Bitwarden Password Manager\) - Bitwarden — Mozilla Firefox$"# + open-floating true +} +// Floating the native Bitwarden desktop app +window-rule { + match app-id=r#"(?i)^bitwarden$"# open-floating true }