aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Util
diff options
context:
space:
mode:
authorBraden Shepherdson <Braden.Shepherdson@gmail.com>2008-06-08 05:24:39 +0200
committerBraden Shepherdson <Braden.Shepherdson@gmail.com>2008-06-08 05:24:39 +0200
commit74b7c11eb22fd48005311883a54b601a0f7db585 (patch)
treed35612efd380eabbca1c5558d0b31cf78a36c15d /XMonad/Util
parent968938892ceedba74e0d7d090d3deaa036ed6380 (diff)
downloadXMonadContrib-74b7c11eb22fd48005311883a54b601a0f7db585.tar.gz
XMonadContrib-74b7c11eb22fd48005311883a54b601a0f7db585.tar.xz
XMonadContrib-74b7c11eb22fd48005311883a54b601a0f7db585.zip
Removed odd scratchpadSpawnDefault, improved documentation.
darcs-hash:20080608032439-d53a8-2a38fb4fedf6ef5cf52f41ce45d737a7dff8a397.gz
Diffstat (limited to 'XMonad/Util')
-rw-r--r--XMonad/Util/Scratchpad.hs23
1 files changed, 9 insertions, 14 deletions
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 (<http://detach.sourceforge.net>) 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