diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-02-13 17:46:37 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-02-14 08:32:14 +0400 |
| commit | befdebfa03399eeed7869fb0788d553f7aa4dcdb (patch) | |
| tree | 4b59f51b62611570f7c92227ce8f6836ab06dab9 /resources | |
| parent | 7960a73e9dda9f82c67e2f7b37766c88f5889c14 (diff) | |
| download | niri-befdebfa03399eeed7869fb0788d553f7aa4dcdb.tar.gz niri-befdebfa03399eeed7869fb0788d553f7aa4dcdb.tar.bz2 niri-befdebfa03399eeed7869fb0788d553f7aa4dcdb.zip | |
Add the beginnings of window rules
Diffstat (limited to 'resources')
| -rw-r--r-- | resources/default-config.kdl | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/resources/default-config.kdl b/resources/default-config.kdl index 2e4e1530..525f9aa3 100644 --- a/resources/default-config.kdl +++ b/resources/default-config.kdl @@ -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 |
