diff options
author | Justin Bogner <mail@justinbogner.com> | 2008-05-23 23:39:37 +0200 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2008-05-23 23:39:37 +0200 |
commit | 616335c7f39ea6fad22dc315d0d71d71df214894 (patch) | |
tree | b9360467defc88315484ff21b726c928be45ec0c /XMonad/Hooks | |
parent | 403cc1a7e117ed52d751b382995e4b1cdb2f6589 (diff) | |
download | XMonadContrib-616335c7f39ea6fad22dc315d0d71d71df214894.tar.gz XMonadContrib-616335c7f39ea6fad22dc315d0d71d71df214894.tar.xz XMonadContrib-616335c7f39ea6fad22dc315d0d71d71df214894.zip |
made fadeInactiveLogHook take an argument amount to fade
darcs-hash:20080523213937-18f27-9792e7d03fb203944e7422ae30cdb2494d7d7ce3.gz
Diffstat (limited to '')
-rw-r--r-- | XMonad/Hooks/FadeInactive.hs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/XMonad/Hooks/FadeInactive.hs b/XMonad/Hooks/FadeInactive.hs index c7fc75e..0ac66ca 100644 --- a/XMonad/Hooks/FadeInactive.hs +++ b/XMonad/Hooks/FadeInactive.hs @@ -29,10 +29,12 @@ import Control.Monad (forM_) -- > import XMonad.Hooks.FadeInactive -- > -- > myLogHook :: X () --- > myLogHook = fadeInactiveLogHook +-- > myLogHook = fadeInactiveLogHook fadeAmount +-- > where fadeAmount = 0xdddddddd -- > -- > main = xmonad defaultConfig { logHook = myLogHook } -- +-- fadeAmount can be any integer -- you will need to have xcompmgr <http://freedesktop.org/wiki/Software/xapps> -- or something similar for this to do anything -- @@ -53,9 +55,9 @@ setOpacity w t = withDisplay $ \dpy -> do io $ changeProperty32 dpy w a c propModeReplace [fromIntegral t] -- | --- fades a window out by setting the opacity to an arbitrary amount -fadeOut :: Window -> X () -fadeOut = flip setOpacity 0xdddddddd +-- fades a window out by setting the opacity +fadeOut :: Integer -> Window -> X () +fadeOut amt = flip setOpacity amt -- | -- makes a window completely opaque @@ -63,10 +65,10 @@ fadeIn :: Window -> X () fadeIn = flip setOpacity 0xffffffff -- | --- lowers the opacity of inactive windows -fadeInactiveLogHook :: X () -fadeInactiveLogHook = withWindowSet $ \s -> - forM_ (concatMap visibleWins $ W.current s : W.visible s) fadeOut >> +-- lowers the opacity of inactive windows to the specified amount +fadeInactiveLogHook :: Integer -> X () +fadeInactiveLogHook amt = withWindowSet $ \s -> + forM_ (concatMap visibleWins $ W.current s : W.visible s) (fadeOut amt) >> withFocused fadeIn where visibleWins = maybe [] unfocused . W.stack . W.workspace |