From 3cc0572c611b4d3dceac79c278a32d2725178fb1 Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Wed, 15 Aug 2007 04:21:01 +0200 Subject: Remove GreedyView: the functionality is now in StackSet darcs-hash:20070815022101-a5988-08dcde058a1265e33eded7951f51d9bc9c608388.gz --- GreedyView.hs | 63 ----------------------------------------------------------- MetaModule.hs | 1 - 2 files changed, 64 deletions(-) delete mode 100644 GreedyView.hs 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 --- License : BSD3-style (see LICENSE) --- --- Maintainer : Spencer Janssen --- 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 diff --git a/MetaModule.hs b/MetaModule.hs index eacf48f..a8ccd25 100644 --- a/MetaModule.hs +++ b/MetaModule.hs @@ -36,7 +36,6 @@ import XMonadContrib.FindEmptyWorkspace () import XMonadContrib.FlexibleResize () import XMonadContrib.FlexibleManipulate () import XMonadContrib.FocusNth () -import XMonadContrib.GreedyView () import XMonadContrib.HintedTile () import XMonadContrib.LayoutHelpers () import XMonadContrib.LayoutHints () -- cgit v1.2.3