diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-03-24 09:03:59 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-03-24 10:22:56 +0400 |
| commit | 493c8dc89072a746795d4e7b94363cfef3e0ee89 (patch) | |
| tree | 31a384a6272a876d95e271e186e08a92ed88092c /niri-config/src | |
| parent | 8b4a9d68e0ba8093e88d20f3a003f78ef27cac0e (diff) | |
| download | niri-493c8dc89072a746795d4e7b94363cfef3e0ee89.tar.gz niri-493c8dc89072a746795d4e7b94363cfef3e0ee89.tar.bz2 niri-493c8dc89072a746795d4e7b94363cfef3e0ee89.zip | |
Implement block-out-from window rule, fix alpha on window screenshots
Diffstat (limited to 'niri-config/src')
| -rw-r--r-- | niri-config/src/lib.rs | 16 |
1 files changed, 16 insertions, 0 deletions
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<bool>, #[knuffel(child, unwrap(argument))] pub opacity: Option<f32>, + #[knuffel(child, unwrap(argument))] + pub block_out_from: Option<BlockOutFrom>, } // 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<Bind>); @@ -915,6 +923,8 @@ impl From<niri_ipc::Action> for Action { #[derive(knuffel::Decode, Debug, Default, PartialEq)] pub struct DebugConfig { + #[knuffel(child, unwrap(argument))] + pub preview_render: Option<PreviewRender>, #[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<Self> { let _span = tracy_client::span!("Config::load"); |
