xmonad-contrib-0.18.1: Community-maintained extensions for xmonad

Copyright | (c) 2008 Justin Bogner <mail@justinbogner.com>
License | BSD
Maintainer | Justin Bogner <mail@justinbogner.com>
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell2010

XMonad.Hooks.FadeInactive

Contents

- Usage

Description

Makes XMonad set the _NET_WM_WINDOW_OPACITY atom for inactive windows, which causes those windows to become slightly translucent if something like xcompmgr is running

Synopsis

- setOpacity :: Window -> Rational -> X ()
- isUnfocused :: Query Bool
- isUnfocusedOnCurrentWS :: Query Bool
- fadeIn :: Window -> X ()
- fadeOut :: Rational -> Window -> X ()
- fadeIf :: Query Bool -> Rational -> Query Rational
- fadeInactiveLogHook :: Rational -> X ()
- fadeInactiveCurrentWSLogHook :: Rational -> X ()
- fadeOutLogHook :: Query Rational -> X ()

# Usage

You can use this module with the following in your `xmonad.hs`:

    import XMonad
    import XMonad.Hooks.FadeInactive

    myLogHook :: X ()
    myLogHook = fadeInactiveLogHook fadeAmount
        where fadeAmount = 0.8

    main = xmonad def { logHook = myLogHook }

fadeAmount can be any rational between 0 and 1. you will need to have xcompmgr http://freedesktop.org/wiki/Software/xapps or something similar for this to do anything

For more detailed instructions on editing the logHook see the tutorial.

For more detailed instructions on editing the layoutHook see the tutorial and XMonad.Doc.Extending.

setOpacity :: Window -> Rational -> X () #

Sets the opacity of a window

isUnfocused :: Query Bool #

Returns True if the window doesn't have the focus.

isUnfocusedOnCurrentWS :: Query Bool #

Returns True if the window doesn't have the focus, and the window is on the current workspace. This is specifically handy in a multi monitor setup (xinerama) where multiple workspaces are visible. Using this, non-focused workspaces are are not faded out making it easier to look and read the content on them.

fadeIn :: Window -> X () #

Makes a window completely opaque

fadeOut :: Rational -> Window -> X () #

Fades a window out by setting the opacity

fadeIf :: Query Bool -> Rational -> Query Rational #

Fades a window by the specified amount if it satisfies the first query, otherwise makes it opaque.

fadeInactiveLogHook :: Rational -> X () #

Sets the opacity of inactive windows to the specified amount

fadeInactiveCurrentWSLogHook :: Rational -> X () #

Set the opacity of inactive windows, on the current workspace, to the specified amount. This is specifically usefull in a multi monitor setup. See `isUnfocusedOnCurrentWS`.

fadeOutLogHook :: Query Rational -> X () #

Fades out every window by the amount returned by the query.