[XMonad] Refactor toggleFadeInactiveLogHook
This commit is contained in:
parent
8fd0b67046
commit
2214ee8c6b
@ -368,9 +368,11 @@ getWorkspaceToScreen = M.fromList . mapP' (W.tag . W.workspace) W.screen <$> get
|
|||||||
getWindowScreen = M.lookup <$> getWindowWorkspace <*> liftX getWorkspaceToScreen
|
getWindowScreen = M.lookup <$> getWindowWorkspace <*> liftX getWorkspaceToScreen
|
||||||
getCurrentScreen = join (withFocusedD Nothing (runQuery getWindowScreen))
|
getCurrentScreen = join (withFocusedD Nothing (runQuery getWindowScreen))
|
||||||
|
|
||||||
toggleFadeInactiveLogHook =
|
fadeCondition =
|
||||||
fadeOutLogHook .
|
isUnfocused <&&> fadeEnabledForWindow <&&>
|
||||||
fadeIf (isUnfocused <&&> fadeEnabledForWindow <&&> fadeEnabledForWorkspace <&&> fadeEnabledForScreen)
|
fadeEnabledForWorkspace <&&> fadeEnabledForScreen
|
||||||
|
|
||||||
|
toggleFadeInactiveLogHook = fadeOutLogHook . fadeIf fadeCondition
|
||||||
|
|
||||||
toggleFadingForActiveWindow = withWindowSet $
|
toggleFadingForActiveWindow = withWindowSet $
|
||||||
maybe (return ()) toggleFading . W.peek
|
maybe (return ()) toggleFading . W.peek
|
||||||
|
Loading…
Reference in New Issue
Block a user