diff options
| author | Josh Rahm <rahm@google.com> | 2024-03-19 15:41:10 -0600 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2024-03-19 15:41:10 -0600 |
| commit | 067aa1810a3d8b669dd27002c270925c35099076 (patch) | |
| tree | 020bb5fda9d7784c3d0c7c944356f3046678372f /src/Config.hs | |
| parent | b194555e98c79ddf658d62eb847d73a42a595e89 (diff) | |
| download | montis-067aa1810a3d8b669dd27002c270925c35099076.tar.gz montis-067aa1810a3d8b669dd27002c270925c35099076.tar.bz2 montis-067aa1810a3d8b669dd27002c270925c35099076.zip | |
Add extensible state and macros. Fix some bugs with keys.
Diffstat (limited to 'src/Config.hs')
| -rw-r--r-- | src/Config.hs | 18 |
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 |