From 2d530e35ee67126c83afb89ed7a3066b65782f57 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Sun, 11 Feb 2024 19:11:21 -0700 Subject: Import tinywl into the project, starting the compositor phase. Right now nothing interesting is happening, but the new tinywl implementation is successfully loading a plugin and calling a handler for 'handle keybinding', which is pretty slick. --- src/Main.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Main.hs') diff --git a/src/Main.hs b/src/Main.hs index bdffd6f..75e21bd 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -3,6 +3,7 @@ module Main (main) where import Control.Monad.Writer (MonadWriter (tell), execWriter) +import Text.Printf import Wetterhorn.Core foreign export ccall wetterhorn :: IO Wetterhorn @@ -12,10 +13,9 @@ wetterhorn = initWetterhorn $ WConfig "This is a string" - ( do - (WState str i) <- getWState - wio $ putStrLn $ "Handle something!!! :) " ++ str ++ " " ++ show i - incrementState + ( \sym -> do + wio $ + printf "Got Key: %x\n" sym ) main :: IO () -- cgit