aboutsummaryrefslogtreecommitdiffstats
path: root/GreedyView.hs
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-08-15 04:21:01 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-08-15 04:21:01 +0200
commit3cc0572c611b4d3dceac79c278a32d2725178fb1 (patch)
tree3d8e4ec3f234e3de838ad74d44ceb7265b3fb6e2 /GreedyView.hs
parent8857f01488afe113bcf7fd8b46418eb863cced42 (diff)
downloadXMonadContrib-3cc0572c611b4d3dceac79c278a32d2725178fb1.tar.gz
XMonadContrib-3cc0572c611b4d3dceac79c278a32d2725178fb1.tar.xz
XMonadContrib-3cc0572c611b4d3dceac79c278a32d2725178fb1.zip
Remove GreedyView: the functionality is now in StackSet
darcs-hash:20070815022101-a5988-08dcde058a1265e33eded7951f51d9bc9c608388.gz
Diffstat (limited to 'GreedyView.hs')
-rw-r--r--GreedyView.hs63
1 files changed, 0 insertions, 63 deletions
diff --git a/GreedyView.hs b/GreedyView.hs
deleted file mode 100644
index 6cfa612..0000000
--- a/GreedyView.hs
+++ /dev/null
@@ -1,63 +0,0 @@
-{-# OPTIONS -fglasgow-exts #-}
------------------------------------------------------------------------------
--- |
--- Module : XMonadContrib.GreedyView
--- Copyright : (c) Spencer Janssen <sjanssen@cse.unl.edu>
--- License : BSD3-style (see LICENSE)
---
--- Maintainer : Spencer Janssen <sjanssen@cse.unl.edu>
--- Stability : unstable
--- Portability : unportable
---
--- GreedyView is an alternative to standard workspace switching. When a
--- workspace is already visible on another screen, GreedyView swaps the
--- contents of that other screen with the current screen.
---
------------------------------------------------------------------------------
-
-module XMonadContrib.GreedyView (
- -- * Usage
- -- $usage
- greedyView
- ) where
-
-import StackSet as W hiding (filter)
-import XMonad
-import Operations
-import Data.List (find)
-
--- $usage
--- To use GreedyView as your default workspace switcher
---
--- Add this import:
---
--- > import XMonadContrib.GreedyView
---
--- And replace the function call used to switch workspaces,
---
--- this:
---
--- > [((m .|. modMask, k), f i)
--- > | (i, k) <- zip [0 .. fromIntegral workspaces - 1] [xK_1 ..]
--- > , (f, m) <- [(view, 0), (shift, shiftMask)]]
---
--- becomes this :
---
--- > [((m .|. modMask, k), f i)
--- > | (i, k) <- zip [0 .. fromIntegral workspaces - 1] [xK_1 ..]
--- > , (f, m) <- [(greedyView, 0), (shift, shiftMask)]]
---
-
-greedyView :: WorkspaceId -> X ()
-greedyView = windows . greedyView'
-
-greedyView' :: WorkspaceId -> WindowSet -> WindowSet
-greedyView' w ws
- | any wTag (hidden ws) = W.view w ws
- | (Just s) <- find (wTag . workspace) (visible ws) = ws { current = (current ws) { workspace = workspace s }
- , visible = s { workspace = workspace (current ws) }
- : filter (not . wTag . workspace) (visible ws)
- }
- | otherwise = ws
- where
- wTag = (w == ) . tag