From 3bd5a012cbf15bd294e1a6290914a6e687cbcf2d Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sun, 3 Sep 2023 11:34:38 +0400 Subject: Add Mod+Ctrl+Shift+T to toggle debug tint --- src/input.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/input.rs') diff --git a/src/input.rs b/src/input.rs index 7dc34b31..f392ddf4 100644 --- a/src/input.rs +++ b/src/input.rs @@ -25,6 +25,7 @@ enum Action { Quit, ChangeVt(i32), Suspend, + ToggleDebugTint, Spawn(String), Screenshot, CloseWindow, @@ -60,6 +61,7 @@ pub enum BackendAction { ChangeVt(i32), Suspend, Screenshot, + ToggleDebugTint, } pub enum CompositorMod { @@ -110,6 +112,7 @@ fn action(comp_mod: CompositorMod, keysym: KeysymHandle, mods: ModifiersState) - KEY_n => Action::Spawn("nautilus".to_owned()), // Alt + PrtSc = SysRq KEY_Sys_Req | KEY_Print => Action::Screenshot, + KEY_T if mods.shift && mods.ctrl => Action::ToggleDebugTint, KEY_q => Action::CloseWindow, KEY_F => Action::ToggleFullscreen, KEY_comma => Action::ConsumeIntoColumn, @@ -193,6 +196,9 @@ impl Niri { Action::Suspend => { return BackendAction::Suspend; } + Action::ToggleDebugTint => { + return BackendAction::ToggleDebugTint; + } Action::Spawn(command) => { if let Err(err) = Command::new(command).spawn() { warn!("error spawning alacritty: {err}"); -- cgit