From 179d29fd4c765dee698058ef63295331ac603639 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 12 Feb 2016 14:17:49 +0100 Subject: hello xmonad-0.12; silence all the warnings --- XMonad/Stockholm/Pager.hs | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'XMonad/Stockholm/Pager.hs') diff --git a/XMonad/Stockholm/Pager.hs b/XMonad/Stockholm/Pager.hs index cdfa432..eb00832 100644 --- a/XMonad/Stockholm/Pager.hs +++ b/XMonad/Stockholm/Pager.hs @@ -1,6 +1,5 @@ module XMonad.Stockholm.Pager - ( defaultPagerConfig - , defaultWindowColors + ( defaultWindowColors , defaultWorkspaceColors , MatchMethod(..) , pager @@ -30,12 +29,12 @@ data PagerConfig = PagerConfig } -defaultPagerConfig :: PagerConfig -defaultPagerConfig = PagerConfig "xft:Sans-8" 100 0 MatchInfix True defaultWorkspaceColors defaultWindowColors +instance Default PagerConfig where + def = PagerConfig "xft:Sans-8" 100 0 MatchInfix True defaultWorkspaceColors defaultWindowColors pager :: PagerConfig -> (String -> X ()) -> [String] -> X () -pager pc = rhombus defaultRhombusConfig +pager pc = rhombus def { rc_font = pc_font pc , rc_cellwidth = pc_cellwidth pc , rc_margin = pc_margin pc @@ -98,7 +97,7 @@ pagerPaint :: -> Bool -> Bool -> X () -pagerPaint pc rc d p gc t r focus match current = do +pagerPaint pc rc _ p gc t r foc match current = do ss <- gets windowset let x = rect_x r @@ -107,14 +106,11 @@ pagerPaint pc rc d p gc t r focus match current = do urgents <- readUrgents let foci = map W.focus $ catMaybes $ map W.stack $ W.workspaces ss - let color = pc_windowColors pc focus match current -- :: Bool -> (String, String) - (_, _, _fg_color) = pc_workspaceColors pc focus match current + let color = pc_windowColors pc foc match current -- :: Bool -> (String, String) + (_, _, _fg_color) = pc_workspaceColors pc foc match current - fg_color <- stringToPixel d _fg_color - - let r = screenRect $ W.screenDetail $ W.current ss - let a = fi (rect_width r) / fi (rect_height r) - let scale = fi (rc_cellwidth rc) / fi (rect_width r) + let sr = screenRect $ W.screenDetail $ W.current ss + let scale = fi (rc_cellwidth rc) / fi (rect_width sr) -- TODO whenNothing print error whenJust (findWorkspace t ss) $ \ ws -> do @@ -129,14 +125,13 @@ pagerPaint pc rc d p gc t r focus match current = do mapM_ (drawMiniWindow d p gc x y color' scale) (W.up s) drawMiniWindow - :: RealFrac a - => Display + :: Display -> Drawable -> GC -> Position -> Position -> (Window -> (String, String)) - -> a + -> Double -> Window -> IO () drawMiniWindow d p gc ox oy color s win = do -- cgit v1.2.3