user3003873
user3003873

Reputation: 553

Xmonad add fading to logHook

I am beginner in haskell and my question may be obvious. I would like to add fading in xmonad de. The code:

xmonad $ defaultConfig                                                  
         { manageHook = manageDocks <+> manageHook defaultConfig
         , layoutHook = smartSpacing 7 $ avoidStruts $ layoutHook defaultConfig
         , borderWidth = 1
         , logHook = dynamicLogWithPP $ xmobarPP
                         { ppOutput = hPutStrLn xmproc
                         , ppTitle = xmobarColor "green" "" . shorten 50
                         }
         , modMask = mod4Mask
         ...

I need to append fadeInactive to logHook.

fadeInactiveLogHook fadeAmount
     where fadeAmount = 0.8

I tried:

logHook = fadeInactiveLogHook 0.8 $ dynamicLogWithPP $ xmobarPP
                            { ppOutput = hPutStrLn xmproc
                            , ppTitle = xmobarColor "green" "" . shorten 
                            }

But its wrong.

Upvotes: 1

Views: 446

Answers (1)

deshtop
deshtop

Reputation: 745

Not so obvious for a Haskell beginner. You must use

logHook = fadeInactiveLogHook 0.8 
          <+> dynamicLogWithPP xmobarPP
                  { ppOutput = hPutStrLn xmproc
                  , ppTitle = xmobarColor "green" "" . shorten 50
                  }

(has been corrected according to the comment)

Upvotes: 2

Related Questions