|
XMonad.Core | Portability | not portable, uses cunning newtype deriving | Stability | unstable | Maintainer | sjanssen@cse.unl.edu |
|
|
|
Description |
The X monad, a state monad transformer over IO, for the window
manager state, and support routines.
|
|
Synopsis |
|
|
|
Documentation |
|
|
The X monad, a StateT transformer over IO encapsulating the window
manager state
Dynamic components may be retrieved with get, static components
with ask. With newtype deriving we get readers and state monads
instantiated on XConf and XState automatically.
| Instances | |
|
|
|
|
|
|
|
Virtual workspace indicies
|
|
|
Physical screen indicies
| Constructors | | Instances | |
|
|
|
The Rectangle with screen dimensions and the list of gaps
| Constructors | | Instances | |
|
|
|
XState, the window manager state.
Just the display, width, height and a window list
| Constructors | | Instances | |
|
|
|
Constructors | XConf | | display :: Display | the X11 display
| config :: !(XConfig Layout) | initial user configuration
| theRoot :: !Window | the root window
| normalBorder :: !Pixel | border color of unfocused windows
| focusedBorder :: !Pixel | border color of the focused window
| keyActions :: !(Map (KeyMask, KeySym) (X ())) | a mapping of key presses to actions
| buttonActions :: !(Map (KeyMask, Button) (Window -> X ())) | a mapping of button presses to actions
|
|
| Instances | |
|
|
|
Constructors | XConfig | | normalBorderColor :: !String | Non focused windows border color. Default: "#dddddd"
| focusedBorderColor :: !String | Focused windows border color. Default: "#ff0000"
| terminal :: !String | The preferred terminal application. Default: "xterm"
| layoutHook :: !(l Window) | The avaiable layouts
| manageHook :: !ManageHook | The action to run when a new window is opened
| workspaces :: [String] | The list of workspaces' names
| defaultGaps :: [(Int, Int, Int, Int)] | The list of gaps, per screen
| numlockMask :: !KeyMask | The numlock modifier
| modMask :: !KeyMask | the mod modifier
| keys :: XConfig Layout -> Map (ButtonMask, KeySym) (X ()) | The key binding: a map from key presses and actions
| mouseBindings :: XConfig Layout -> Map (ButtonMask, Button) (Window -> X ()) | The mouse bindings
| borderWidth :: !Dimension | The border width
| logHook :: X () | The action to perform when the windows set is changed
|
|
|
|
|
class Show (layout a) => LayoutClass layout a where | Source |
|
The different layout modes
doLayout: given a Rectangle and a Stack, layout the stack elements
inside the given Rectangle. If an element is not given a Rectangle
by doLayout, then it is not shown on screen. Windows are restacked
according to the order they are returned by doLayout.
| | Methods | | Given a Rectangle in which to place the windows, and a Stack of
windows, return a list of windows and their corresponding Rectangles.
The order of windows in this list should be the desired stacking order.
Also return a modified layout, if this layout needs to be modified
(e.g. if we keep track of the windows we have displayed).
| | | This is a pure version of doLayout, for cases where we don't need
access to the X monad to determine how to layout the windows, and
we don't need to modify our layout itself.
| | | handleMessage performs message handling for that layout. If
handleMessage returns Nothing, then the layout did not respond to
that message and the screen is not refreshed. Otherwise, handleMessage
returns an updated Layout and the screen is refreshed.
| | | Respond to a message by (possibly) changing our layout, but taking
no other action. If the layout changes, the screen will be refreshed.
| | | This should be a human-readable string that is used when selecting
layouts by name.
|
| | Instances | |
|
|
|
LayoutClass handling. See particular instances in Operations.hs
An existential type that can hold any object that is in Read and LayoutClass.
| Constructors | | Instances | |
|
|
|
Using the Layout as a witness, parse existentially wrapped windows
from a String
|
|
Typeable (typeOf) |
|
|
Based on ideas in An Extensible Dynamically-Typed Hierarchy of Exceptions,
Simon Marlow, 2006. Use extensible messages to the handleMessage handler.
User-extensible messages must be a member of this class.
| | Instances | |
|
|
|
A wrapped value of some type in the Message class.
| Constructors | forall a . Message a => SomeMessage a | |
|
|
|
|
And now, unwrap a given, unknown Message type, performing a (dynamic)
type check on the result.
|
|
|
This calls doLayout if there are any windows to be laid out.
|
|
|
LayoutMessages are core messages that all layouts (especially stateful
layouts) should consider handling.
| Constructors | Hide | sent when a layout becomes non-visible
| ReleaseResources | sent when xmonad is exiting or restarting
|
| Instances | |
|
|
|
Run the X monad, given a chunk of X monad code, and an initial state
Return the result, and final state
|
|
|
Run in the X monad, and in case of exception, and catch it and log it
to stderr, and run the error case.
|
|
|
Execute the argument, catching all exceptions. Either this function or
catchX should be used at all callsites of user customized code.
|
|
|
General utilities
Lift an IO action into the X monad
|
|
|
Lift an IO action into the X monad. If the action results in an IO
exception, log the exception to stderr and continue normal execution.
|
|
|
Run a monad action with the current display settings
|
|
|
Run a monadic action with the current stack set
|
|
|
True if the given window is the root window
|
|
|
Wrapper for the common case of atom internment
|
|
|
spawn. Launch an external application
|
|
|
Restart xmonad via exec().
If the first parameter is 'Just name', restart will attempt to execute the
program corresponding to name. Otherwise, xmonad will attempt to execute
the name of the current program.
When the second parameter is True, xmonad will attempt to resume with the
current window state.
|
|
|
Return the path to ~/.xmonad.
|
|
|
'recompile force', recompile ~/.xmonad/xmonad.hs when any of the
following apply:
* force is True
* the xmonad executable does not exist
* the xmonad executable is older than xmonad.hs
The -i flag is used to restrict recompilation to the xmonad.hs file only.
Compilation errors (if any) are logged to ~/.xmonad/xmonad.errors. If
GHC indicates failure with a non-zero exit code, an xmessage containing
GHC's is spawned.
|
|
|
A trace for the X monad. Logs a string to stderr. The result may
be found in your .xsession-errors file
|
|
|
Run a side effecting action with the current workspace. Like when but
|
|
|
Conditionally run an action, using a X event to decide
|
|
|
|
|
|
|
Common non-predefined atoms
|
|
|
|
|
Constructors | | Instances | |
|
|
|
|
Produced by Haddock version 2.4.2 |