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 /src | |
| 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
Diffstat (limited to 'src')
| -rw-r--r-- | src/hotkey_overlay.rs | 3 | ||||
| -rw-r--r-- | src/niri.rs | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/hotkey_overlay.rs b/src/hotkey_overlay.rs index 44aa4f92..84601277 100644 --- a/src/hotkey_overlay.rs +++ b/src/hotkey_overlay.rs @@ -45,8 +45,7 @@ pub type HotkeyOverlayRenderElement<R> = RelocateRenderElement<MemoryRenderBuffe impl HotkeyOverlay { pub fn new(config: Rc<RefCell<Config>>, comp_mod: CompositorMod) -> Self { Self { - // Start the compositor with the overlay open. - is_open: true, + is_open: false, config, comp_mod, buffers: RefCell::new(HashMap::new()), diff --git a/src/niri.rs b/src/niri.rs index dc1efd87..d4e39831 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -868,7 +868,12 @@ impl Niri { let screenshot_ui = ScreenshotUi::new(); let config_error_notification = ConfigErrorNotification::new(); - let hotkey_overlay = HotkeyOverlay::new(config.clone(), backend.mod_key()); + + let mut hotkey_overlay = HotkeyOverlay::new(config.clone(), backend.mod_key()); + if !config_.hotkey_overlay.skip_at_startup { + hotkey_overlay.show(); + } + let exit_confirm_dialog = match ExitConfirmDialog::new() { Ok(x) => Some(x), Err(err) => { |
