aboutsummaryrefslogtreecommitdiff
path: root/src/Config.hs
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-03-15 00:44:24 -0600
committerJosh Rahm <joshuarahm@gmail.com>2024-03-15 00:44:24 -0600
commit8707a1def309ea689ecf5b324656f43c4560eeb6 (patch)
treeec20f255aaf8f1205dc7bd62364e33b31cd7ac6a /src/Config.hs
parent2afcbcf4687517cec953a05cce26ac7a57378f49 (diff)
downloadwetterhorn-8707a1def309ea689ecf5b324656f43c4560eeb6.tar.gz
wetterhorn-8707a1def309ea689ecf5b324656f43c4560eeb6.tar.bz2
wetterhorn-8707a1def309ea689ecf5b324656f43c4560eeb6.zip
Implement ability to customize the keys "putHandler" functionality.
This will be useful for the future when I will implement macro-recording functionality.
Diffstat (limited to 'src/Config.hs')
-rw-r--r--src/Config.hs10
1 files changed, 9 insertions, 1 deletions
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")