aboutsummaryrefslogtreecommitdiffstats
path: root/Commands.hs
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@unibz.it>2007-09-30 23:32:25 +0200
committerAndrea Rossato <andrea.rossato@unibz.it>2007-09-30 23:32:25 +0200
commitf991acf326a2bc33a75637ce4424737e284b8919 (patch)
treecdee4f78a5356b47a59cdf3d0535b5986608ee9a /Commands.hs
parentfad4514781e0e321a651504fa514b37becf9e072 (diff)
downloadXMonadContrib-f991acf326a2bc33a75637ce4424737e284b8919.tar.gz
XMonadContrib-f991acf326a2bc33a75637ce4424737e284b8919.tar.xz
XMonadContrib-f991acf326a2bc33a75637ce4424737e284b8919.zip
Commands: added recent layout commands
darcs-hash:20070930213225-32816-51585111588a0ff51d60328d855df4fcf55f40a3.gz
Diffstat (limited to '')
-rw-r--r--Commands.hs37
1 files changed, 20 insertions, 17 deletions
diff --git a/Commands.hs b/Commands.hs
index 5b9b900..ccb8c55 100644
--- a/Commands.hs
+++ b/Commands.hs
@@ -29,7 +29,7 @@ import XMonad
import Operations
import StackSet hiding (workspaces)
import XMonadContrib.Dmenu (dmenu)
-import {-# SOURCE #-} Config (workspaces)
+import {-# SOURCE #-} Config (workspaces,possibleLayouts)
import qualified Data.Map as M
import System.Exit
@@ -77,23 +77,26 @@ screenCommands = [((m ++ show sc), screenWorkspace (fromIntegral sc) >>= flip wh
defaultCommands :: [(String, X ())]
defaultCommands = workspaceCommands ++ screenCommands
- ++ [ ("shrink", sendMessage Shrink)
- , ("expand", sendMessage Expand)
- , ("restart-wm", restart Nothing True)
- , ("restart-wm-no-resume", restart Nothing False)
- , ("layout", sendMessage NextLayout)
- , ("xterm", spawn "xterm")
- , ("run", spawn "exe=`dmenu_path | dmenu -b` && exec $exe")
- , ("kill", kill)
- , ("refresh", refresh)
- , ("focus-up", windows $ focusUp)
- , ("focus-down", windows $ focusDown)
- , ("swap-up", windows $ swapUp)
- , ("swap-down", windows $ swapDown)
- , ("swap-master", windows $ swapMaster)
- , ("sink", withFocused $ windows . sink)
- , ("quit-wm", io $ exitWith ExitSuccess)
+ ++ [ ("shrink" , sendMessage Shrink )
+ , ("expand" , sendMessage Expand )
+ , ("next-layout" , sendMessage NextLayout )
+ , ("previous-layout" , sendMessage PrevLayout )
+ , ("default-layout" , setLayout (head possibleLayouts) )
+ , ("restart-wm" , sr >> restart Nothing True )
+ , ("restart-wm-no-resume", sr >> restart Nothing False )
+ , ("xterm" , spawn "xterm" )
+ , ("run" , spawn "exe=`dmenu_path | dmenu -b` && exec $exe" )
+ , ("kill" , kill )
+ , ("refresh" , refresh )
+ , ("focus-up" , windows $ focusUp )
+ , ("focus-down" , windows $ focusDown )
+ , ("swap-up" , windows $ swapUp )
+ , ("swap-down" , windows $ swapDown )
+ , ("swap-master" , windows $ swapMaster )
+ , ("sink" , withFocused $ windows . sink )
+ , ("quit-wm" , io $ exitWith ExitSuccess )
]
+ where sr = broadcastMessage ReleaseResources
runCommand :: [(String, X ())] -> X ()
runCommand cl = do