mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
Add the beginnings of window rules
This commit is contained in:
@@ -248,6 +248,49 @@ animations {
|
||||
}
|
||||
}
|
||||
|
||||
// Window rules let you adjust behavior for individual windows.
|
||||
// They are processed in order of appearance in this file.
|
||||
// (This example rule is commented out with a "/-" in front.)
|
||||
/-window-rule {
|
||||
// Match directives control which windows this rule will apply to.
|
||||
// You can match by app-id and by title.
|
||||
// The window must match all properties of the match directive.
|
||||
match app-id="org.myapp.MyApp" title="My Cool App"
|
||||
|
||||
// There can be multiple match directives. A window must match any one
|
||||
// of the rule's match directives.
|
||||
//
|
||||
// If there are no match directives, any window will match the rule.
|
||||
match title="Second App"
|
||||
|
||||
// You can also add exclude directives which have the same properties.
|
||||
// If a window matches any exclude directive, it won't match this rule.
|
||||
//
|
||||
// Both app-id and title are regular expressions.
|
||||
// Raw KDL strings are helpful here.
|
||||
exclude app-id=r#"\.unwanted\."#
|
||||
|
||||
// Here are the properties that you can set on a window rule.
|
||||
// You can override the default column width.
|
||||
default-column-width { proportion 0.75; }
|
||||
|
||||
// You can set the output that this window will initially open on.
|
||||
// If such an output does not exist, it will open on the currently
|
||||
// focused output as usual.
|
||||
open-on-output "eDP-1"
|
||||
}
|
||||
|
||||
// Here's a useful example. Work around WezTerm's initial configure bug
|
||||
// by setting an empty default-column-width.
|
||||
window-rule {
|
||||
// This regular expression is intentially made as specific as possile,
|
||||
// since this is the default config, and we want no false positives.
|
||||
// You can get away with just app-id="wezterm" if you want.
|
||||
// The regular expression can match anywhere in the string.
|
||||
match app-id=r#"^org\.wezfurlong\.wezterm$"#
|
||||
default-column-width {}
|
||||
}
|
||||
|
||||
binds {
|
||||
// Keys consist of modifiers separated by + signs, followed by an XKB key name
|
||||
// in the end. To find an XKB name for a particular key, you may use a program
|
||||
|
||||
Reference in New Issue
Block a user