diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-01-20 08:31:05 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-01-20 08:31:05 +0400 |
| commit | dc47de178f1d3910bc193973192586e8b118e475 (patch) | |
| tree | 469694ada22354212f923c7c385defb383ba3133 | |
| parent | 65e864965ec6e4a08a8e6696f779a5734033b6be (diff) | |
| download | niri-dc47de178f1d3910bc193973192586e8b118e475.tar.gz niri-dc47de178f1d3910bc193973192586e8b118e475.tar.bz2 niri-dc47de178f1d3910bc193973192586e8b118e475.zip | |
Add an option to skip the hotkey overlay at startup
| -rw-r--r-- | niri-config/src/lib.rs | 15 | ||||
| -rw-r--r-- | resources/default-config.kdl | 6 | ||||
| -rw-r--r-- | src/hotkey_overlay.rs | 3 | ||||
| -rw-r--r-- | src/niri.rs | 7 |
4 files changed, 28 insertions, 3 deletions
diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs index f05b78b9..03b39390 100644 --- a/niri-config/src/lib.rs +++ b/niri-config/src/lib.rs @@ -34,6 +34,8 @@ pub struct Config { ] pub screenshot_path: Option<String>, #[knuffel(child, default)] + pub hotkey_overlay: HotkeyOverlay, + #[knuffel(child, default)] pub binds: Binds, #[knuffel(child, default)] pub debug: DebugConfig, @@ -336,6 +338,12 @@ pub struct Struts { pub bottom: u16, } +#[derive(knuffel::Decode, Debug, Default, Clone, Copy, PartialEq, Eq)] +pub struct HotkeyOverlay { + #[knuffel(child)] + pub skip_at_startup: bool, +} + #[derive(knuffel::Decode, Debug, Default, PartialEq)] pub struct Binds(#[knuffel(children)] pub Vec<Bind>); @@ -766,6 +774,10 @@ mod tests { screenshot-path "~/Screenshots/screenshot.png" + hotkey-overlay { + skip-at-startup + } + binds { Mod+T { spawn "alacritty"; } Mod+Q { close-window; } @@ -881,6 +893,9 @@ mod tests { xcursor_size: 16, }, screenshot_path: Some(String::from("~/Screenshots/screenshot.png")), + hotkey_overlay: HotkeyOverlay { + skip_at_startup: true, + }, binds: Binds(vec