From 493c8dc89072a746795d4e7b94363cfef3e0ee89 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sun, 24 Mar 2024 09:03:59 +0400 Subject: Implement block-out-from window rule, fix alpha on window screenshots --- niri-config/src/lib.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'niri-config/src') diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs index 9bf62e13..0bf3fe0d 100644 --- a/niri-config/src/lib.rs +++ b/niri-config/src/lib.rs @@ -699,6 +699,8 @@ pub struct WindowRule { pub draw_border_with_background: Option, #[knuffel(child, unwrap(argument))] pub opacity: Option, + #[knuffel(child, unwrap(argument))] + pub block_out_from: Option, } // Remember to update the PartialEq impl when adding fields! @@ -723,6 +725,12 @@ impl PartialEq for Match { } } +#[derive(knuffel::DecodeScalar, Debug, Clone, Copy, PartialEq, Eq)] +pub enum BlockOutFrom { + Screencast, + ScreenCapture, +} + #[derive(Debug, Default, PartialEq)] pub struct Binds(pub Vec); @@ -915,6 +923,8 @@ impl From for Action { #[derive(knuffel::Decode, Debug, Default, PartialEq)] pub struct DebugConfig { + #[knuffel(child, unwrap(argument))] + pub preview_render: Option, #[knuffel(child)] pub dbus_interfaces_in_non_session_instances: bool, #[knuffel(child)] @@ -931,6 +941,12 @@ pub struct DebugConfig { pub emulate_zero_presentation_time: bool, } +#[derive(knuffel::DecodeScalar, Debug, Clone, Copy, PartialEq, Eq)] +pub enum PreviewRender { + Screencast, + ScreenCapture, +} + impl Config { pub fn load(path: &Path) -> miette::Result { let _span = tracy_client::span!("Config::load"); -- cgit