diff options
| author | Pavel Egorov <[email protected]> | 2025-12-09 01:16:07 +0300 |
|---|---|---|
| committer | Pavel Egorov <[email protected]> | 2025-12-09 01:16:07 +0300 |
| commit | 469f7669b2002ea6378c311297fa5d4c90a02c1d (patch) | |
| tree | f6f67a65c6e731fb525c98eb89780e8eb44be228 /.config | |
| parent | f15826037ec06e0464ea91b5d618a5523aaf232a (diff) | |
| download | dotfiles-469f7669b2002ea6378c311297fa5d4c90a02c1d.tar.gz dotfiles-469f7669b2002ea6378c311297fa5d4c90a02c1d.zip | |
[niri] Set some window rules
Diffstat (limited to '')
| -rw-r--r-- | .config/niri/config.kdl | 41 | ||||
| -rw-r--r-- | .config/niri/windows.kdl | 41 |
2 files changed, 42 insertions, 40 deletions
diff --git a/.config/niri/config.kdl b/.config/niri/config.kdl index 211f12d..af12bf8 100644 --- a/.config/niri/config.kdl +++ b/.config/niri/config.kdl | |||
| @@ -7,6 +7,7 @@ include "input.kdl" | |||
| 7 | include "output.kdl" | 7 | include "output.kdl" |
| 8 | include "layout.kdl" | 8 | include "layout.kdl" |
| 9 | include "binds.kdl" | 9 | include "binds.kdl" |
| 10 | include "windows.kdl" | ||
| 10 | 11 | ||
| 11 | 12 | ||
| 12 | // Add lines like this to spawn processes at startup. | 13 | // Add lines like this to spawn processes at startup. |
| @@ -51,46 +52,6 @@ animations { | |||
| 51 | // slowdown 3.0 | 52 | // slowdown 3.0 |
| 52 | } | 53 | } |
| 53 | 54 | ||
| 54 | // Window rules let you adjust behavior for individual windows. | ||
| 55 | // Find more information on the wiki: | ||
| 56 | // https://yalter.github.io/niri/Configuration:-Window-Rules | ||
| 57 | |||
| 58 | // Work around WezTerm's initial configure bug | ||
| 59 | // by setting an empty default-column-width. | ||
| 60 | window-rule { | ||
| 61 | // This regular expression is intentionally made as specific as possible, | ||
| 62 | // since this is the default config, and we want no false positives. | ||
| 63 | // You can get away with just app-id="wezterm" if you want. | ||
| 64 | match app-id=r#"^org\.wezfurlong\.wezterm$"# | ||
| 65 | default-column-width {} | ||
| 66 | } | ||
| 67 | |||
| 68 | // Open the Firefox picture-in-picture player as floating by default. | ||
| 69 | window-rule { | ||
| 70 | // This app-id regular expression will work for both: | ||
| 71 | // - host Firefox (app-id is "firefox") | ||
| 72 | // - Flatpak Firefox (app-id is "org.mozilla.firefox") | ||
| 73 | match app-id=r#"firefox$"# title="^Picture-in-Picture$" | ||
| 74 | open-floating true | ||
| 75 | } | ||
| 76 | |||
| 77 | window-rule { | ||
| 78 | match app-id=r#"^org\.keepassxc\.KeePassXC$"# | ||
| 79 | |||
| 80 | block-out-from "screen-capture" | ||
| 81 | |||
| 82 | // Use this instead if you want them visible on third-party screenshot tools. | ||
| 83 | // block-out-from "screencast" | ||
| 84 | } | ||
| 85 | |||
| 86 | // Example: enable rounded corners for all windows. | ||
| 87 | // (This example rule is commented out with a "/-" in front.) | ||
| 88 | window-rule { | ||
| 89 | geometry-corner-radius 12 | ||
| 90 | clip-to-geometry true | ||
| 91 | } | ||
| 92 | |||
| 93 | |||
| 94 | cursor { | 55 | cursor { |
| 95 | xcursor-theme "breeze_cursors" | 56 | xcursor-theme "breeze_cursors" |
| 96 | } | 57 | } |
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 @@ | |||
| 1 | // Window rules let you adjust behavior for individual windows. | ||
| 2 | // Find more information on the wiki: | ||
| 3 | // https://yalter.github.io/niri/Configuration:-Window-Rules | ||
| 4 | |||
| 5 | window-rule { | ||
| 6 | geometry-corner-radius 12 | ||
| 7 | clip-to-geometry true | ||
| 8 | } | ||
| 9 | |||
| 10 | // Open the Firefox picture-in-picture player as floating by default. | ||
| 11 | window-rule { | ||
| 12 | // This app-id regular expression will work for both: | ||
| 13 | // - host Firefox (app-id is "firefox") | ||
| 14 | // - Flatpak Firefox (app-id is "org.mozilla.firefox") | ||
| 15 | match app-id=r#"firefox$"# title="^Picture-in-Picture$" | ||
| 16 | |||
| 17 | open-floating true | ||
| 18 | default-floating-position x=32 y=32 relative-to="bottom-right" | ||
| 19 | } | ||
| 20 | |||
| 21 | window-rule { | ||
| 22 | match app-id=r#"^org\.keepassxc\.KeePassXC$"# | ||
| 23 | |||
| 24 | block-out-from "screen-capture" | ||
| 25 | } | ||
| 26 | |||
| 27 | window-rule { | ||
| 28 | match app-id=r#"^org\.telegram\.desktop$"# | ||
| 29 | exclude app-id=r#"^org\.telegram\.desktop$"# title="Media viewer" | ||
| 30 | |||
| 31 | default-column-width { | ||
| 32 | fixed 900 | ||
| 33 | } | ||
| 34 | } | ||
| 35 | |||
| 36 | window-rule { | ||
| 37 | match app-id=r#"^org\.telegram\.desktop$"# title="Media viewer" | ||
| 38 | |||
| 39 | open-floating true | ||
| 40 | } | ||
| 41 | |||
