aboutsummaryrefslogtreecommitdiff
path: root/src/Config.hs
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-03-04 01:46:17 -0700
committerJosh Rahm <joshuarahm@gmail.com>2024-03-04 01:46:17 -0700
commit9cd976a21d0c78e6c9291685b4d2efcb6d65a1d7 (patch)
tree12d80e8c31152c4b392e90190aa57134f6dcf06b /src/Config.hs
parent6ebfbf75a551c3cb464b410654249d9a11204c17 (diff)
downloadmontis-9cd976a21d0c78e6c9291685b4d2efcb6d65a1d7.tar.gz
montis-9cd976a21d0c78e6c9291685b4d2efcb6d65a1d7.tar.bz2
montis-9cd976a21d0c78e6c9291685b4d2efcb6d65a1d7.zip
Added a new KeysM monad.
This monad allows keybindings to look and feel like one is writing blocking code with constructs like: key <- nextKey when (key == x) $ do key2 <- nextKey ... ... but this code does not block or do any io shenanigans, it under the hood just changes the handler on the state. It seems pretty awesome and opens the doors for some pretty expressive key bindings.
Diffstat (limited to 'src/Config.hs')
-rw-r--r--src/Config.hs27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/Config.hs b/src/Config.hs
index e49a869..87a0277 100644
--- a/src/Config.hs
+++ b/src/Config.hs
@@ -1,14 +1,23 @@
-module Config where
+module Config (config) where
+import Wetterhorn.Core.Keys
import Wetterhorn.Core.W
import Wetterhorn.Layout.Full
-import Wetterhorn.Layout.Combine
-config = defaultConfig {
- keyHook = wio . print,
- surfaceHook = wio . print,
- layout = WindowLayout Full
-}
+config :: Config WindowLayout
+config =
+ defaultConfig
+ { hooks =
+ defaultHooks
+ { keyHook = ofKeys testKeys,
+ -- runKeybinds $ do
+ -- bind (Mod1 .+ 'r') (shellExec "wofi --show run")
--- wetterhorn :: IO Wetterhorn
--- wetterhorn = initWetterhorn defaultConfig
+ -- subbind (Mod1 .+ 'g') $ do
+ -- bind 't' $ shellExec "alacritty"
+
+ -- bind (Mod1 .+ 'Q') requestHotReload,
+ surfaceHook = wio . print
+ },
+ layout = WindowLayout Full
+ }