diff options
author | jao <jao@gnu.org> | 2022-09-30 06:50:53 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-09-30 06:50:53 +0100 |
commit | ef380c045957413948d390c152f6401869526285 (patch) | |
tree | 178db978e94bba8f67d68e63b90e286dedbc2074 /src/Xmobar/X11 | |
parent | e9a86329d40f82f7710ac5be294e908d221e00bc (diff) | |
download | xmobar-ef380c045957413948d390c152f6401869526285.tar.gz xmobar-ef380c045957413948d390c152f6401869526285.tar.bz2 |
Run.Parsers -> Config.Template
Diffstat (limited to 'src/Xmobar/X11')
-rw-r--r-- | src/Xmobar/X11/Draw.hs | 3 | ||||
-rw-r--r-- | src/Xmobar/X11/Loop.hs | 10 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/Xmobar/X11/Draw.hs b/src/Xmobar/X11/Draw.hs index a056136..b380497 100644 --- a/src/Xmobar/X11/Draw.hs +++ b/src/Xmobar/X11/Draw.hs @@ -25,7 +25,6 @@ import Foreign.C.Types as FT import qualified Graphics.X11.Xlib as X11 import qualified Xmobar.Config.Types as C -import qualified Xmobar.Run.Parsers as P import qualified Xmobar.Draw.Types as D import qualified Xmobar.Draw.Cairo as DC @@ -69,7 +68,7 @@ withPixmap disp win (X11.Rectangle _ _ w h) depth action = do X11.sync disp True return res -draw :: [[P.Segment]] -> T.X [D.ActionPos] +draw :: [[C.Segment]] -> T.X [D.ActionPos] draw segments = do xconf <- ask let disp = T.display xconf diff --git a/src/Xmobar/X11/Loop.hs b/src/Xmobar/X11/Loop.hs index 599e680..721a35b 100644 --- a/src/Xmobar/X11/Loop.hs +++ b/src/Xmobar/X11/Loop.hs @@ -35,10 +35,10 @@ import qualified Graphics.X11.Xinerama as Xinerama import qualified Graphics.X11.Xrandr as Xrandr import qualified Xmobar.Config.Types as C +import qualified Xmobar.Config.Template as CT import qualified Xmobar.Run.Actions as A import qualified Xmobar.Run.Loop as L -import qualified Xmobar.Run.Parsers as P import qualified Xmobar.System.Utils as U import qualified Xmobar.System.Signal as S @@ -145,15 +145,15 @@ signalLoop xc@(T.XConf d r w fs is cfg) actions signalv strs = do r' <- W.repositionWin d w (NE.head fs) rcfg signalLoop (T.XConf d r' w fs is rcfg) actions signalv strs -parseSegments :: C.Config -> STM.TVar [String] -> IO [[P.Segment]] +parseSegments :: C.Config -> STM.TVar [String] -> IO [[C.Segment]] parseSegments conf v = do s <- STM.readTVarIO v let l:c:r:_ = s ++ repeat "" - MR.liftIO $ mapM (P.parseString conf) [l, c, r] + MR.liftIO $ mapM (CT.parseString conf) [l, c, r] -updateIconCache :: T.XConf -> [[P.Segment]] -> IO T.XConf +updateIconCache :: T.XConf -> [[C.Segment]] -> IO T.XConf updateIconCache xc@(T.XConf d _ w _ c cfg) segs = do - let paths = [p | (P.Icon p, _, _, _) <- concat segs] + let paths = [p | (C.Icon p, _, _, _) <- concat segs] c' <- Bitmap.updateCache d w c (C.iconRoot cfg) paths return $ xc {T.iconCache = c'} |