From 74b7c11eb22fd48005311883a54b601a0f7db585 Mon Sep 17 00:00:00 2001 From: Braden Shepherdson Date: Sun, 8 Jun 2008 05:24:39 +0200 Subject: Removed odd scratchpadSpawnDefault, improved documentation. darcs-hash:20080608032439-d53a8-2a38fb4fedf6ef5cf52f41ce45d737a7dff8a397.gz --- XMonad/Util/Scratchpad.hs | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'XMonad/Util/Scratchpad.hs') diff --git a/XMonad/Util/Scratchpad.hs b/XMonad/Util/Scratchpad.hs index 6e124e3..df19789 100644 --- a/XMonad/Util/Scratchpad.hs +++ b/XMonad/Util/Scratchpad.hs @@ -13,7 +13,7 @@ -- A tool like detach () turns it -- into a launchpad for X apps. -- --- By default, your xmonad terminal is used, and mod+s is the hotkey. +-- By default, your xmonad terminal is used. -- The default ManageHook uses a centered, half-screen-wide, -- quarter-screen-tall window. -- The key, position and size are configurable. @@ -22,14 +22,12 @@ -- Known supported terminals: rxvt, rxvt-unicode, xterm. -- Most others are likely to follow the lead set by xterm. -- --- Add the following to your xmonad.hs keybindings to use the default mod+s: --- --- > scratchpadSpawnDefault conf --- --- Or specify your own key binding, with the action: +-- Bind the following to a key in your xmonad.hs keybindings: -- -- > scratchpadSpawnAction conf -- +-- Where @conf@ is the configuration. +-- -- And add one of the @scratchpadManageHook*@s to your ManageHook list. -- The default rectangle is half the screen wide and a quarter of the -- screen tall, centered. @@ -37,8 +35,7 @@ ----------------------------------------------------------------------------- module XMonad.Util.Scratchpad ( - scratchpadSpawnDefault - ,scratchpadSpawnAction + scratchpadSpawnAction ,scratchpadManageHookDefault ,scratchpadManageHook ) where @@ -50,12 +47,6 @@ import qualified XMonad.StackSet --- | Complete key binding. Pops up the terminal on mod+s. -scratchpadSpawnDefault :: XConfig l -- ^ The configuration, to retrieve terminal and modMask - -> ((KeyMask, KeySym), X ()) -scratchpadSpawnDefault conf = ((modMask conf, xK_s), scratchpadSpawnAction conf) - - -- | Action to pop up the terminal, for the user to bind to a custom key. scratchpadSpawnAction :: XConfig l -- ^ The configuration, to retrieve the terminal -> X () @@ -70,6 +61,10 @@ scratchpadManageHookDefault = scratchpadManageHook scratchpadDefaultRect -- | The ManageHook, with a user-specified StackSet.RationalRect. +-- eg. +-- +-- > scratchpadManageHook (W.RationalRect 0.25 0.375 0.5 0.25) +-- scratchpadManageHook :: XMonad.StackSet.RationalRect -- ^ User-specified screen rectangle. -> ManageHook scratchpadManageHook rect = title =? "scratchpad" --> doRectFloat rect -- cgit v1.2.3