From f50a53345965eec4119d7d8a2767c4213ab9e4a1 Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Tue, 27 Aug 2024 17:14:17 +0200 Subject: [PATCH] home/niri: Block out sensitive windows for capture --- home/config/nil/desktop.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/home/config/nil/desktop.nix b/home/config/nil/desktop.nix index b70d5a6..9166425 100644 --- a/home/config/nil/desktop.nix +++ b/home/config/nil/desktop.nix @@ -136,12 +136,30 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) { bottom-right = 4.0; }; } + { + matches = [ + { app-id = ''^notifications$''; } + ]; + + block-out-from = "screencast"; + } + { + matches = [ + { app-id = ''^firefox\.private$''; } + { app-id = ''^kitty\.private$''; } + { app-id = ''^org\.gnome\.Fractal$''; } + { app-id = ''^org\.keepassxc\.KeePassXC$''; } + { app-id = ''^signal$''; } + ]; + + block-out-from = "screen-capture"; + } ]; binds = with config.lib.niri.actions; { # Application spawning "Mod+Return".action = spawn [ kitty ]; - "Mod+Shift+Return".action = spawn [ kitty fish "--private" ]; + "Mod+Shift+Return".action = spawn [ kitty "--app-id" "private" fish "--private" ]; "Mod+E".action = spawn [ fuzzel ]; # Window & column focus