aboutsummaryrefslogtreecommitdiff
path: root/niri-config/src
diff options
context:
space:
mode:
authorpeelz <peelz.dev@gmail.com>2025-01-22 00:00:35 -0500
committerIvan Molodetskikh <yalterz@gmail.com>2025-01-25 10:36:36 +0300
commit54a1cd5069cd2f4eb302862fae115b742fbf32a4 (patch)
treeebe619c021d8d316bf33e28beee7e46182f34e97 /niri-config/src
parent748d90b443b9f20134020c21760b5b6c2c42a7de (diff)
downloadniri-54a1cd5069cd2f4eb302862fae115b742fbf32a4.tar.gz
niri-54a1cd5069cd2f4eb302862fae115b742fbf32a4.tar.bz2
niri-54a1cd5069cd2f4eb302862fae115b742fbf32a4.zip
Add clipboard disable-primary setting
Diffstat (limited to 'niri-config/src')
-rw-r--r--niri-config/src/lib.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs
index 11da976e..62c91b34 100644
--- a/niri-config/src/lib.rs
+++ b/niri-config/src/lib.rs
@@ -53,6 +53,8 @@ pub struct Config {
]
pub screenshot_path: Option<String>,
#[knuffel(child, default)]
+ pub clipboard: Clipboard,
+ #[knuffel(child, default)]
pub hotkey_overlay: HotkeyOverlay,
#[knuffel(child, default)]
pub animations: Animations,
@@ -785,6 +787,12 @@ pub struct HotkeyOverlay {
pub skip_at_startup: bool,
}
+#[derive(knuffel::Decode, Debug, Default, Clone, Copy, PartialEq, Eq)]
+pub struct Clipboard {
+ #[knuffel(child)]
+ pub disable_primary: bool,
+}
+
#[derive(knuffel::Decode, Debug, Clone, PartialEq)]
pub struct Animations {
#[knuffel(child)]
@@ -3432,6 +3440,10 @@ mod tests {
screenshot-path "~/Screenshots/screenshot.png"
+ clipboard {
+ disable-primary
+ }
+
hotkey-overlay {
skip-at-startup
}
@@ -3686,6 +3698,9 @@ mod tests {
hide_after_inactive_ms: Some(3000),
},
screenshot_path: Some(String::from("~/Screenshots/screenshot.png")),
+ clipboard: Clipboard {
+ disable_primary: true,
+ },
hotkey_overlay: HotkeyOverlay {
skip_at_startup: true,
},