From 469f7669b2002ea6378c311297fa5d4c90a02c1d Mon Sep 17 00:00:00 2001 From: Pavel Egorov Date: Tue, 9 Dec 2025 01:16:07 +0300 Subject: [niri] Set some window rules --- .config/niri/windows.kdl | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .config/niri/windows.kdl (limited to '.config/niri/windows.kdl') diff --git a/.config/niri/windows.kdl b/.config/niri/windows.kdl new file mode 100644 index 0000000..5f5b9d4 --- /dev/null +++ b/.config/niri/windows.kdl @@ -0,0 +1,41 @@ +// Window rules let you adjust behavior for individual windows. +// Find more information on the wiki: +// https://yalter.github.io/niri/Configuration:-Window-Rules + +window-rule { + geometry-corner-radius 12 + clip-to-geometry true +} + +// Open the Firefox picture-in-picture player as floating by default. +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$" + + open-floating true + default-floating-position x=32 y=32 relative-to="bottom-right" +} + +window-rule { + match app-id=r#"^org\.keepassxc\.KeePassXC$"# + + block-out-from "screen-capture" +} + +window-rule { + match app-id=r#"^org\.telegram\.desktop$"# + exclude app-id=r#"^org\.telegram\.desktop$"# title="Media viewer" + + default-column-width { + fixed 900 + } +} + +window-rule { + match app-id=r#"^org\.telegram\.desktop$"# title="Media viewer" + + open-floating true +} + -- cgit v1.3 From b277dc0a9a0c994d40c2264430e55df70eb801b0 Mon Sep 17 00:00:00 2001 From: Pavel Egorov Date: Tue, 9 Dec 2025 18:43:50 +0300 Subject: [niri] Add named workspaces and more window rules --- .config/niri/windows.kdl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to '.config/niri/windows.kdl') diff --git a/.config/niri/windows.kdl b/.config/niri/windows.kdl index 5f5b9d4..98a1e34 100644 --- a/.config/niri/windows.kdl +++ b/.config/niri/windows.kdl @@ -1,3 +1,6 @@ +workspace "main" +workspace "games" + // Window rules let you adjust behavior for individual windows. // Find more information on the wiki: // https://yalter.github.io/niri/Configuration:-Window-Rules @@ -18,6 +21,12 @@ window-rule { default-floating-position x=32 y=32 relative-to="bottom-right" } +window-rule { + match app-id=r#"firefox"# title="Choose User Profile" + + open-floating true +} + window-rule { match app-id=r#"^org\.keepassxc\.KeePassXC$"# @@ -39,3 +48,14 @@ window-rule { open-floating true } +window-rule { + match app-id=r#"steam"# + + open-on-workspace "games" +} + +window-rule { + match app-id=r#"steam"# title="Steam" + + open-maximized true +} -- cgit v1.3 From 141c00850a2e062b3a6403d97786b7b4bfac32d4 Mon Sep 17 00:00:00 2001 From: Pavel Egorov Date: Wed, 10 Dec 2025 14:19:08 +0300 Subject: [niri] Tweak window rules --- .config/niri/windows.kdl | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to '.config/niri/windows.kdl') diff --git a/.config/niri/windows.kdl b/.config/niri/windows.kdl index 98a1e34..44410d3 100644 --- a/.config/niri/windows.kdl +++ b/.config/niri/windows.kdl @@ -59,3 +59,11 @@ window-rule { open-maximized true } + +window-rule { + match app-id=r#"steam"# title="Friends List" + + default-column-width { + fixed 500 + } +} -- cgit v1.3