mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
Implement block-out-from window rule, fix alpha on window screenshots
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user