summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-09-17 23:19:53 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-09-17 23:19:53 +0200
commitd97d93319c89516c9d68188a625eaafe092f5fbe (patch)
tree1c7ba66107e755755d03e590b02055fae1364c3a
parent23a0a3a3a683a4237196699a09719371e2042190 (diff)
downloadmetatile-d97d93319c89516c9d68188a625eaafe092f5fbe.tar
metatile-d97d93319c89516c9d68188a625eaafe092f5fbe.zip
Remove Operations functions which have StackSet equivalents, just use 'windows foo' instead
darcs-hash:20070917211953-a5988-8e5141139dfaa7ebc2e2f8f3ae4f923094bd71d7
-rw-r--r--Config.hs22
-rw-r--r--Operations.hs16
2 files changed, 11 insertions, 27 deletions
diff --git a/Config.hs b/Config.hs
index 1185b0c..f691914 100644
--- a/Config.hs
+++ b/Config.hs
@@ -140,14 +140,14 @@ keys = M.fromList $
, ((modMask, xK_n ), refresh) -- %! Resize viewed windows to the correct size
-- move focus up or down the window stack
- , ((modMask, xK_Tab ), focusDown) -- %! Move focus to the next window
- , ((modMask, xK_j ), focusDown) -- %! Move focus to the next window
- , ((modMask, xK_k ), focusUp ) -- %! Move focus to the previous window
+ , ((modMask, xK_Tab ), windows W.focusDown) -- %! Move focus to the next window
+ , ((modMask, xK_j ), windows W.focusDown) -- %! Move focus to the next window
+ , ((modMask, xK_k ), windows W.focusUp ) -- %! Move focus to the previous window
-- modifying the window order
- , ((modMask, xK_Return), swapMaster) -- %! Swap the focused window and the master window
- , ((modMask .|. shiftMask, xK_j ), swapDown ) -- %! Swap the focused window with the next window
- , ((modMask .|. shiftMask, xK_k ), swapUp ) -- %! Swap the focused window with the previous window
+ , ((modMask, xK_Return), windows W.swapMaster) -- %! Swap the focused window and the master window
+ , ((modMask .|. shiftMask, xK_j ), windows W.swapDown ) -- %! Swap the focused window with the next window
+ , ((modMask .|. shiftMask, xK_k ), windows W.swapUp ) -- %! Swap the focused window with the previous window
-- resizing the master/slave ratio
, ((modMask, xK_h ), sendMessage Shrink) -- %! Shrink the master area
@@ -171,15 +171,15 @@ keys = M.fromList $
++
-- mod-[1..9] %! Switch to workspace N
-- mod-shift-[1..9] %! Move client to workspace N
- [((m .|. modMask, k), f i)
+ [((m .|. modMask, k), windows $ f i)
| (i, k) <- zip workspaces [xK_1 ..]
- , (f, m) <- [(view, 0), (shift, shiftMask)]]
+ , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
++
-- mod-{w,e,r} %! Switch to physical/Xinerama screens 1, 2, or 3
-- mod-shift-{w,e,r} %! Move client to screen 1, 2, or 3
- [((m .|. modMask, key), screenWorkspace sc >>= flip whenJust f)
+ [((m .|. modMask, key), screenWorkspace sc >>= flip whenJust (windows . f))
| (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
- , (f, m) <- [(windows . W.view, 0), (shift, shiftMask)]]
+ , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
-- Extension-provided key bindings lists
-- |
@@ -190,7 +190,7 @@ mouseBindings = M.fromList $
-- mod-button1 %! Set the window to floating mode and move by dragging
[ ((modMask, button1), (\w -> focus w >> mouseMoveWindow w))
-- mod-button2 %! Raise the window to the top of the stack
- , ((modMask, button2), (\w -> focus w >> swapMaster))
+ , ((modMask, button2), (\w -> focus w >> windows W.swapMaster))
-- mod-button3 %! Set the window to floating mode and resize by dragging
, ((modMask, button3), (\w -> focus w >> mouseResizeWindow w))
-- Extension-provided mouse bindings
diff --git a/Operations.hs b/Operations.hs
index 39dc253..ae95d9e 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -74,22 +74,6 @@ unmanage w = do
setWMState w 0 {-withdrawn-}
modify (\s -> s {mapped = S.delete w (mapped s), waitingUnmap = M.delete w (waitingUnmap s)})
--- | focus. focus window up or down. or swap various windows.
-focusUp, focusDown, swapUp, swapDown, swapMaster :: X ()
-focusUp = windows W.focusUp
-focusDown = windows W.focusDown
-swapUp = windows W.swapUp
-swapDown = windows W.swapDown
-swapMaster = windows W.swapMaster
-
--- | shift. Move a window to a new workspace, 0 indexed.
-shift :: WorkspaceId -> X ()
-shift = windows . W.shift
-
--- | view. Change the current workspace to workspace at offset n (0 indexed).
-view :: WorkspaceId -> X ()
-view = windows . W.greedyView
-
-- | Modify the size of the status gap at the top of the current screen
-- Taking a function giving the current screen, and current geometry.
modifyGap :: (Int -> (Int,Int,Int,Int) -> (Int,Int,Int,Int)) -> X ()