aboutsummaryrefslogtreecommitdiff
path: root/src/Config.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Config.hs')
-rw-r--r--src/Config.hs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Config.hs b/src/Config.hs
index 04d13c6..e71f48a 100644
--- a/src/Config.hs
+++ b/src/Config.hs
@@ -1,20 +1,14 @@
module Config (config) where
+import Text.Printf
import Control.Monad.IO.Class
import Control.Monad.Loops
import Wetterhorn.Core.KeyEvent qualified as KeyEvent
import Wetterhorn.Core.Keys
import Wetterhorn.Core.W
+import Wetterhorn.Keys.Macros
import Wetterhorn.Layout.Full
-alsoLog :: KeyContinuation -> W ()
-alsoLog kh =
- putKeyHandler
- ( \ke -> do
- liftIO $ putStrLn $ (: []) $ KeyEvent.codepoint ke
- kh ke
- )
-
config :: Config WindowLayout
config =
defaultConfig
@@ -25,15 +19,21 @@ config =
},
layout = WindowLayout Full,
resetHook = do
- useKeysWithContinuation alsoLog $ do
+ useKeysWithContinuation recordMacroContinuation $ do
kp <- nextKeyPress
+ bind kp (Mod1 .+ 'q') macroKeyBind
+
+ bind kp (weak $ Mod1 .+ '@') replayMacroKeybind
+
bind kp (Mod1 .+ 'r') (shellExec "wofi --show run")
bind kp (Shift .+ Mod1 .+ 'R') requestHotReload
bind kp (Mod1 .+ 't') (shellExec "alacritty")
+ bind kp (Mod1 .+ 'n') (return () :: W ())
+
bind kp (weak $ Mod1 .+ '∫') (shellExec "gxmessage hi")
bind kp (Mod1 .+ 'p') $ do