xmonad-contrib-0.16: Third party extensions for xmonad

Copyright | (c) Roman Cheplyaka Ivan N. Veselov <veselov@gmail.com>
License | BSD-style (see LICENSE)
Maintainer | Roman Cheplyaka <roma@ro-che.info>
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell98

XMonad.Layout.IM

Contents

- Usage
- Hints
- TODO

Description

Layout modfier suitable for workspace with multi-windowed instant messenger (like Psi or Tkabber).

Synopsis

- data Property
  - = Title String
  - | ClassName String
  - | Resource String
  - | Role String
  - | Machine String
  - | And Property Property
  - | Or Property Property
  - | Not Property
  - | Const Bool
  - | Tagged String
- data IM a = IM Rational Property
- withIM :: LayoutClass l a => Rational -> Property -> l a -> ModifiedLayout AddRoster l a
- gridIM :: Rational -> Property -> ModifiedLayout AddRoster Grid a
- data AddRoster a

# Usage

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

    import XMonad.Layout.IM
    import Data.Ratio ((%))

Then edit your `layoutHook` by adding IM modifier to layout which you prefer for managing your chat windows (Grid in this example, another useful choice to consider is Tabbed layout).

    myLayout = withIM (1%7) (ClassName "Tkabber") Grid ||| Full ||| etc..
    main = xmonad def { layoutHook = myLayout }

Here `1%7` is the part of the screen which your roster will occupy, `ClassName "Tkabber"` tells xmonad which window is actually your roster.

Screenshot: http://haskell.org/haskellwiki/Image:Xmonad-layout-im.png

For more detailed instructions on editing the layoutHook see:

XMonad.Doc.Extending

# Hints

To launch IM layout automatically on your IM workspace use XMonad.Layout.PerWorkspace.

By default the roster window will appear on the left side. To place roster window on the right side, use `reflectHoriz` from XMonad.Layout.Reflect module.

# TODO

This item are questionable. Please let me know if you find them useful.

- shrink/expand

data Property Source #

Most of the property constructors are quite self-explaining.

Constructors

Title String |
ClassName String |
Resource String |
Role String | WM_WINDOW_ROLE property
Machine String | WM_CLIENT_MACHINE property
And Property Property infixr 9 |
Or Property Property infixr 8 |
Not Property |
Const Bool |
Tagged String | Tagged via `TagWindows`

#### Instances

Instances details

Read Property Source # |
Instance details Defined in XMonad.Util.WindowProperties Methods readsPrec :: Int -> ReadS Property # readList :: ReadS [Property] # readPrec :: ReadPrec Property readListPrec :: ReadPrec [Property]
Show Property Source # |
Instance details Defined in XMonad.Util.WindowProperties Methods showsPrec :: Int -> Property -> ShowS # show :: Property -> String # showList :: [Property] -> ShowS #
Predicate Property Window Source # |
Instance details Defined in XMonad.Layout.LayoutBuilder Methods alwaysTrue :: Proxy Window -> Property Source # checkPredicate :: Property -> Window -> X Bool Source #
Predicate Property Window Source # |
Instance details Defined in XMonad.Layout.LayoutBuilderP Methods alwaysTrue :: Proxy Window -> Property Source # checkPredicate :: Property -> Window -> X Bool Source #

data IM a Source #

This is for compatibility with old configs only and will be removed in future versions!

Constructors

IM Rational Property |

#### Instances

Instances details

LayoutClass IM Window Source # |

Instance details

Defined in XMonad.Layout.IM

Methods

runLayout :: Workspace WorkspaceId (IM Window) Window -> Rectangle -> X ([(Window, Rectangle)], Maybe (IM Window)) Source #

doLayout :: IM Window -> Rectangle -> Stack Window -> X ([(Window, Rectangle)], Maybe (IM Window)) Source #

pureLayout :: IM Window -> Rectangle -> Stack Window -> [(Window, Rectangle)] Source #

emptyLayout :: IM Window -> Rectangle -> X ([(Window, Rectangle)], Maybe (IM Window)) Source #

handleMessage :: IM Window -> SomeMessage -> X (Maybe (IM Window)) Source #

pureMessage :: IM Window -> SomeMessage -> Maybe (IM Window) Source #

description :: IM Window -> String Source #

Read (IM a) Source # |
Instance details Defined in XMonad.Layout.IM Methods readsPrec :: Int -> ReadS (IM a) # readList :: ReadS [IM a] # readPrec :: ReadPrec (IM a) readListPrec :: ReadPrec [IM a]
Show (IM a) Source # |
Instance details Defined in XMonad.Layout.IM Methods showsPrec :: Int -> IM a -> ShowS # show :: IM a -> String # showList :: [IM a] -> ShowS #

withIM :: LayoutClass l a => Rational -> Property -> l a -> ModifiedLayout AddRoster l a Source #

Modifier which converts given layout to IM-layout (with dedicated space for roster and original layout for chat windows)

gridIM :: Rational -> Property -> ModifiedLayout AddRoster Grid a Source #

IM layout modifier applied to the Grid layout

data AddRoster a Source #

Data type for LayoutModifier which converts given layout to IM-layout (with dedicated space for the roster and original layout for chat windows)

#### Instances

Instances details

LayoutModifier AddRoster Window Source # |

Instance details

Defined in XMonad.Layout.IM

Methods

modifyLayout :: LayoutClass l Window => AddRoster Window -> Workspace WorkspaceId (l Window) Window -> Rectangle -> X ([(Window, Rectangle)], Maybe (l Window)) Source #

modifyLayoutWithUpdate :: LayoutClass l Window => AddRoster Window -> Workspace WorkspaceId (l Window) Window -> Rectangle -> X (([(Window, Rectangle)], Maybe (l Window)), Maybe (AddRoster Window)) Source #

handleMess :: AddRoster Window -> SomeMessage -> X (Maybe (AddRoster Window)) Source #

handleMessOrMaybeModifyIt :: AddRoster Window -> SomeMessage -> X (Maybe (Either (AddRoster Window) SomeMessage)) Source #

pureMess :: AddRoster Window -> SomeMessage -> Maybe (AddRoster Window) Source #

redoLayout :: AddRoster Window -> Rectangle -> Maybe (Stack Window) -> [(Window, Rectangle)] -> X ([(Window, Rectangle)], Maybe (AddRoster Window)) Source #

pureModifier :: AddRoster Window -> Rectangle -> Maybe (Stack Window) -> [(Window, Rectangle)] -> ([(Window, Rectangle)], Maybe (AddRoster Window)) Source #

hook :: AddRoster Window -> X () Source #

unhook :: AddRoster Window -> X () Source #

modifierDescription :: AddRoster Window -> String Source #

modifyDescription :: LayoutClass l Window => AddRoster Window -> l Window -> String Source #

Read (AddRoster a) Source # |
Instance details Defined in XMonad.Layout.IM Methods readsPrec :: Int -> ReadS (AddRoster a) # readList :: ReadS [AddRoster a] # readPrec :: ReadPrec (AddRoster a) readListPrec :: ReadPrec [AddRoster a]
Show (AddRoster a) Source # |
Instance details Defined in XMonad.Layout.IM Methods showsPrec :: Int -> AddRoster a -> ShowS # show :: AddRoster a -> String # showList :: [AddRoster a] -> ShowS #