aboutsummaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-03-24 09:03:59 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2024-03-24 10:22:56 +0400
commit493c8dc89072a746795d4e7b94363cfef3e0ee89 (patch)
tree31a384a6272a876d95e271e186e08a92ed88092c /resources
parent8b4a9d68e0ba8093e88d20f3a003f78ef27cac0e (diff)
downloadniri-493c8dc89072a746795d4e7b94363cfef3e0ee89.tar.gz
niri-493c8dc89072a746795d4e7b94363cfef3e0ee89.tar.bz2
niri-493c8dc89072a746795d4e7b94363cfef3e0ee89.zip
Implement block-out-from window rule, fix alpha on window screenshots
Diffstat (limited to 'resources')
-rw-r--r--resources/default-config.kdl34
1 files changed, 34 insertions, 0 deletions
diff --git a/resources/default-config.kdl b/resources/default-config.kdl
index 0878f213..0bb31697 100644
--- a/resources/default-config.kdl
+++ b/resources/default-config.kdl
@@ -396,6 +396,22 @@ animations {
// The following properties apply dynamically while a window is open.
+ // You can block out windows from xdg-desktop-portal screencasts.
+ // They will be replaced with solid black rectangles.
+ // This can be useful for password managers or messenger windows, etc.
+ // To preview and set up this rule, check the preview-render option
+ // in the debug section of the config.
+ //
+ // WARNING: the window is NOT blocked out from the screenshot UI.
+ // If you open the screenshot UI while screencasting, blocked out windows
+ // WILL BE VISIBLE on the screencast.
+ block-out-from "screencast"
+
+ // You can also block out the window out of all screen captures, including
+ // the screenshot UI. This way you avoid accidentally showing the window
+ // on a screencast when opening the screenshot UI.
+ block-out-from "screen-capture"
+
// You can amend the window's minimum and maximum size in logical pixels.
// Keep in mind that the window itself always has a final say in its size.
// These values instruct niri to never ask the window to be smaller than
@@ -437,6 +453,19 @@ window-rule {
default-column-width {}
}
+// Another example: block out two password managers from screencasts.
+// (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$"#
+
+ // Warning: will be visible when opening the screenshot UI.
+ block-out-from "screencast"
+
+ // Use this instead to block out from all screen captures.
+ // block-out-from "screen-capture"
+}
+
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
@@ -662,6 +691,11 @@ binds {
// Settings for debugging. Not meant for normal use.
// These can change or stop working at any point with little notice.
debug {
+ // Render the monitors as if for a screencast or a screen capture.
+ // Useful for previewing the block-out-from window rule.
+ // preview-render "screencast"
+ // preview-render "screen-capture"
+
// Make niri take over its DBus services even if it's not running as a session.
// Useful for testing screen recording changes without having to relogin.
// The main niri instance will *not* currently take back the services; so you will