diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2025-06-22 01:06:01 +0200 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2025-06-22 01:06:01 +0200 |
| commit | 93289029b938864d1111c4285d64f3f0a1e5735d (patch) | |
| tree | 4e314991d3d358412bfc0475cc87e1758ee0f351 /app/Foobar/Application.hs | |
| parent | 876b51e784f4d86fd538f45680314517bd139678 (diff) | |
set up config
Diffstat (limited to 'app/Foobar/Application.hs')
| -rw-r--r-- | app/Foobar/Application.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/Foobar/Application.hs b/app/Foobar/Application.hs index 5713cc3..94c8182 100644 --- a/app/Foobar/Application.hs +++ b/app/Foobar/Application.hs @@ -9,6 +9,7 @@ import Data.Maybe (fromJust) import Data.GI.Base import Data.Text import GHC.Generics (Generic) +import Foobar.Services.Config (initConfiguration, loadConfiguration, observeConfiguration) import Declarative.Gtk import qualified GI.Gtk as Gtk @@ -44,6 +45,11 @@ appHandler MsgDoSomething s = s.stateText <~ "Did something!" onActivate :: Gtk.Application -> IO () onActivate app = do + conf <- initConfiguration + putStrLn $ "Initial config: " ++ show conf + observeConfiguration $ do + conf' <- loadConfiguration + putStrLn $ "Updated config: " ++ show conf' provider <- new Gtk.CssProvider [] provider.loadFromResource "/foobar/styles/default.css" disp <- Gdk.displayGetDefault |
