XMonad.Layout.MagicFocus

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

Copyright | (c) Peter De Wachter <pdewacht@gmail.com>
License | BSD
Maintainer | Peter De Wachter <pdewacht@gmail.com>
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell2010

XMonad.Layout.MagicFocus

Contents

- Usage

Description

Automagically put the focused window in the master area.

Synopsis

- magicFocus :: l a -> ModifiedLayout MagicFocus l a
- promoteWarp :: Event -> X All
- promoteWarp' :: (Rational, Rational) -> (Rational, Rational) -> Event -> X All
- followOnlyIf :: X Bool -> Event -> X All
- disableFollowOnWS :: [WorkspaceId] -> X Bool
- data MagicFocus a

# Usage

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

    import XMonad.Layout.MagicFocus

Then edit your `layoutHook` by adding the magicFocus layout modifier:

    myLayout = magicFocus (Tall 1 (3/100) (1/2)) ||| Full ||| etc..
    main = xmonad def { layoutHook = myLayout,
                        handleEventHook = promoteWarp }

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

magicFocus :: l a -> ModifiedLayout MagicFocus l a #

Create a new layout which automagically puts the focused window in the master area.

promoteWarp :: Event -> X All #

An eventHook that overrides the normal focusFollowsMouse. When the mouse it moved to another window, that window is replaced as the master, and the mouse is warped to inside the new master.

It prevents infinite loops when focusFollowsMouse is true (the default), and MagicFocus is in use when changing focus with the mouse.

This eventHook does nothing when there are floating windows on the current workspace.

promoteWarp' :: (Rational, Rational) -> (Rational, Rational) -> Event -> X All #

promoteWarp' allows you to specify an arbitrary pair of arguments to pass to `updatePointer` when the mouse enters another window.

followOnlyIf :: X Bool -> Event -> X All #

Another event hook to override the focusFollowsMouse and make the pointer only follow if a given condition is satisfied. This could be used to disable focusFollowsMouse only for given workspaces or layouts. Beware that your focusFollowsMouse setting is ignored if you use this event hook.

disableFollowOnWS :: [WorkspaceId] -> X Bool #

Disables focusFollow on the given workspaces:

data MagicFocus a #

#### Instances

Instances details

LayoutModifier MagicFocus Window # |
Instance details Defined in XMonad.Layout.MagicFocus Methods modifyLayout :: LayoutClass l Window => MagicFocus Window -> Workspace WorkspaceId (l Window) Window -> Rectangle -> X ([(Window, Rectangle)], Maybe (l Window)) # modifyLayoutWithUpdate :: LayoutClass l Window => MagicFocus Window -> Workspace WorkspaceId (l Window) Window -> Rectangle -> X (([(Window, Rectangle)], Maybe (l Window)), Maybe (MagicFocus Window)) # handleMess :: MagicFocus Window -> SomeMessage -> X (Maybe (MagicFocus Window)) # handleMessOrMaybeModifyIt :: MagicFocus Window -> SomeMessage -> X (Maybe (Either (MagicFocus Window) SomeMessage)) # pureMess :: MagicFocus Window -> SomeMessage -> Maybe (MagicFocus Window) # redoLayout :: MagicFocus Window -> Rectangle -> Maybe (Stack Window) -> [(Window, Rectangle)] -> X ([(Window, Rectangle)], Maybe (MagicFocus Window)) # pureModifier :: MagicFocus Window -> Rectangle -> Maybe (Stack Window) -> [(Window, Rectangle)] -> ([(Window, Rectangle)], Maybe (MagicFocus Window)) # hook :: MagicFocus Window -> X () # unhook :: MagicFocus Window -> X () # modifierDescription :: MagicFocus Window -> String # modifyDescription :: LayoutClass l Window => MagicFocus Window -> l Window -> String #
Read (MagicFocus a) # |
Instance details Defined in XMonad.Layout.MagicFocus Methods readsPrec :: Int -> ReadS (MagicFocus a) # readList :: ReadS [MagicFocus a] # readPrec :: ReadPrec (MagicFocus a) # readListPrec :: ReadPrec [MagicFocus a] #
Show (MagicFocus a) # |
Instance details Defined in XMonad.Layout.MagicFocus Methods showsPrec :: Int -> MagicFocus a -> ShowS # show :: MagicFocus a -> String # showList :: [MagicFocus a] -> ShowS #