From 8707a1def309ea689ecf5b324656f43c4560eeb6 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Fri, 15 Mar 2024 00:44:24 -0600 Subject: Implement ability to customize the keys "putHandler" functionality. This will be useful for the future when I will implement macro-recording functionality. --- src/Config.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/Config.hs') diff --git a/src/Config.hs b/src/Config.hs index 0cc1c02..4521cc1 100644 --- a/src/Config.hs +++ b/src/Config.hs @@ -8,12 +8,20 @@ import Wetterhorn.Core.Keys import Wetterhorn.Core.W import Wetterhorn.Layout.Full +alsoLog :: KeyHandler -> W () +alsoLog kh = + putKeyHandler + ( \ke -> do + liftIO $ putStrLn $ (: []) $ KeyEvent.codepoint ke + kh ke + ) + config :: Config WindowLayout config = defaultConfig { hooks = defaultHooks - { keyHook = keys $ do + { keyHook = keysWithHandler alsoLog $ do ignoreReleaseEvents bind (Mod1 .+ 'r') (shellExec "wofi --show run") -- cgit