116 lines
3.0 KiB
Plaintext
116 lines
3.0 KiB
Plaintext
// Window rules let you adjust behavior for individual windows.
|
|
// Find more information on the wiki:
|
|
// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
|
|
|
|
|
|
// 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$"
|
|
match title="^Nextcloud$"
|
|
match title="^Volume Control$"
|
|
match title="^Network Connections$"
|
|
match title="Bitwarden"
|
|
match title="Extension: (Bitwarden Password Manager) - Bitwarden — Zen Browser"
|
|
match title="^Extension:"
|
|
match app-id="^org.kde.kwalletd6$"
|
|
match app-id="^hyprland-share-picker$"
|
|
match title="^Check Spelling$"
|
|
match title="^notificationtoasts"
|
|
match title="^Calendar Reminders$"
|
|
match title="^Editor Settings$"
|
|
match title="Picture in picture"
|
|
|
|
|
|
open-floating true
|
|
}
|
|
|
|
window-rule {
|
|
match app-id=r#"kitty"#
|
|
// opacity 0.95
|
|
draw-border-with-background false
|
|
focus-ring {
|
|
on
|
|
}
|
|
}
|
|
|
|
window-rule {
|
|
match app-id="^Slack$"
|
|
match app-id="^discord$"
|
|
match app-id="^org.telegram.desktop$"
|
|
match app-id="^ZapZap$"
|
|
|
|
open-on-workspace "Comms"
|
|
}
|
|
|
|
window-rule {
|
|
match app-id="^spotify$"
|
|
match app-id="^com.sayonara-player.Sayonara$"
|
|
|
|
open-on-workspace "Music"
|
|
}
|
|
|
|
window-rule {
|
|
match app-id="^steam$"
|
|
exclude title="^Steam$"
|
|
|
|
// these two will be overridden for all but the chat window
|
|
default-column-width { proportion 0.2; }
|
|
default-window-height { proportion 0.333; }
|
|
|
|
open-focused false
|
|
open-on-workspace "Gaming"
|
|
open-on-output "DP-1"
|
|
}
|
|
|
|
window-rule {
|
|
match title="^Friends List$"
|
|
default-window-height { proportion 0.666; }
|
|
|
|
open-focused false
|
|
open-on-workspace "Gaming"
|
|
open-on-output "DP-1"
|
|
}
|
|
|
|
window-rule {
|
|
match title="^Steam$"
|
|
default-column-width { proportion 0.8; }
|
|
default-window-height { proportion 1.0; }
|
|
|
|
open-focused false
|
|
open-on-workspace "Gaming"
|
|
open-on-output "DP-1"
|
|
}
|
|
|
|
|
|
// Work around WezTerm's initial configure bug
|
|
// by setting an empty default-column-width.
|
|
window-rule {
|
|
// This regular expression is intentionally made as specific as possible,
|
|
// since this is the default config, and we want no false positives.
|
|
// You can get away with just app-id="wezterm" if you want.
|
|
match app-id=r#"^org\.wezfurlong\.wezterm$"#
|
|
default-column-width {}
|
|
}
|
|
// Example: block out two password managers from screen capture.
|
|
// (This example rule is commented out with a "/-" in front.)
|
|
/-window-rule {
|
|
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
|
|
match app-id=r#"^org\.gnome\.World\.Secrets$"#
|
|
match app-id=r#".*[bB]itwarden.*"#
|
|
|
|
block-out-from "screen-capture"
|
|
|
|
// Use this instead if you want them visible on third-party screenshot tools.
|
|
// block-out-from "screencast"
|
|
}
|
|
|
|
// Example: enable rounded corners for all windows.
|
|
// (This example rule is commented out with a "/-" in front.)
|
|
/-window-rule {
|
|
geometry-corner-radius 12
|
|
clip-to-geometry true
|
|
}
|