mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-19 06:03:47 -07:00
fix stupid dzenUrgencyHook bug
This commit is contained in:
7
Dzen.hs
7
Dzen.hs
@@ -43,15 +43,14 @@ dzenScreen sc str timeout = dzenWithArgs str ["-xs", screen] timeout
|
|||||||
-- | Flashes when a window requests your attention and you can't see it. For use with
|
-- | Flashes when a window requests your attention and you can't see it. For use with
|
||||||
-- XMonadContrib.UrgencyHook. Usage:
|
-- XMonadContrib.UrgencyHook. Usage:
|
||||||
-- > urgencyHook = dzenUrgencyHook (5 `seconds`)
|
-- > urgencyHook = dzenUrgencyHook (5 `seconds`)
|
||||||
-- Bug: Doesn't flash if you're on the same workspace, Full or Tabbed layout, different window.
|
|
||||||
dzenUrgencyHook :: Int -> Window -> X ()
|
dzenUrgencyHook :: Int -> Window -> X ()
|
||||||
dzenUrgencyHook duration w = do
|
dzenUrgencyHook duration w = do
|
||||||
visibles <- gets mapped
|
visibles <- gets mapped
|
||||||
name <- getName w
|
name <- getName w
|
||||||
ws <- gets windowset
|
ws <- gets windowset
|
||||||
whenJust (W.findIndex w ws) (flash name ws visibles)
|
whenJust (W.findIndex w ws) (flash name visibles)
|
||||||
where flash name ws visibles index =
|
where flash name visibles index =
|
||||||
when (index /= W.tag (W.workspace (W.current ws)) && not (S.member w visibles)) $
|
when (not $ S.member w visibles) $
|
||||||
dzen (show name ++ " requests your attention on workspace " ++ index) duration
|
dzen (show name ++ " requests your attention on workspace " ++ index) duration
|
||||||
|
|
||||||
dzenWithArgs :: String -> [String] -> Int -> X ()
|
dzenWithArgs :: String -> [String] -> Int -> X ()
|
||||||
|
Reference in New Issue
Block a user