Description

Row layout with individually resizable elements.

Synopsis

# Usage

This module provides a layout which places all windows in a single row; the size occupied by each individual window can be increased and decreased, and a window can be set to use the whole available space whenever it has focus.

You can use this module by including the following in your ~/.xmonad/xmonad.hs:

import XMonad.Layout.ZoomRow

and using zoomRow somewhere in your layoutHook, for example:

myLayout = zoomRow ||| Mirror zoomRow

To be able to resize windows, you can create keybindings to send the relevant ZoomMessages:

  -- Increase the size occupied by the focused window
-- Decrease the size occupied by the focused window
, ((modMayk             , xK_minus), sendMessage zoomOut)
-- Reset the size occupied by the focused window
, ((modMask             , xK_equal), sendMessage zoomReset)
-- (Un)Maximize the focused window
, ((modMask             , xK_f    ), sendMessage ToggleZoomFull)

data ZoomRow f a Source #

A layout that arranges its windows in a horizontal row, and allows to change the relative size of each element independently.

Instances

# Creation

zoomRow :: (Eq a, Show a, Read a) => ZoomRow ClassEQ a Source #

ZoomRow layout for laying out elements which are instances of Eq. Perfect for Windows.

# Messages

The type of messages accepted by a ZoomRow layout

Constructors

 Zoom Rational Multiply the focused window's size factor by the given number. ZoomTo Rational Set the focused window's size factor to the given number. ZoomFull Bool Set whether the focused window should occupy all available space when it has focus ZoomFullToggle Toggle whether the focused window should occupy all available space when it has focus

Instances

 Source # MethodsshowList :: [ZoomMessage] -> ShowS # Source #

Increase the size of the focused window. Defined as Zoom 1.5

Decrease the size of the focused window. Defined as Zoom (2/3)

Reset the size of the focused window. Defined as ZoomTo 1

# Use with non-Eq elements

Haskell's Eq class is usually concerned with structural equality, whereas what this layout really wants is for its elements to have a unique identity, even across changes. There are cases (such as, importantly, Windows) where the Eq instance for a type actually does that, but if you want to lay out something more exotic than windows and your Eq means something else, you can use the following.

zoomRowWith :: (EQF f a, Show (f a), Read (f a), Show a, Read a) => f a -> ZoomRow f a Source #

ZoomRow layout with a custom equality predicate. It should of course satisfy the laws for Eq, and you should also make sure that the layout never has to handle two "equal" elements at the same time (it won't do any huge damage, but might behave a bit strangely).

class EQF f a where Source #

Class for equivalence relations. Must be transitive, reflexive.

Minimal complete definition

eq

Methods

eq :: f a -> a -> a -> Bool Source #

Instances

 Eq a => EQF ClassEQ a Source # Methodseq :: ClassEQ a -> a -> a -> Bool Source # Eq a => EQF GroupEQ (Group l a) Source # Methodseq :: GroupEQ (Group l a) -> Group l a -> Group l a -> Bool Source #

data ClassEQ a Source #

To use the usual ==:

Constructors

 ClassEQ

Instances

 Eq a => EQF ClassEQ a Source # Methodseq :: ClassEQ a -> a -> a -> Bool Source # Eq (ClassEQ a) Source # Methods(==) :: ClassEQ a -> ClassEQ a -> Bool #(/=) :: ClassEQ a -> ClassEQ a -> Bool # Read (ClassEQ a) Source # MethodsreadsPrec :: Int -> ReadS (ClassEQ a) # Show (ClassEQ a) Source # MethodsshowsPrec :: Int -> ClassEQ a -> ShowS #show :: ClassEQ a -> String #showList :: [ClassEQ a] -> ShowS #