From 4132469d520fb3c14ce3101e9ba4cb41a7b7c681 Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Thu, 14 Jun 2007 16:39:53 +0200 Subject: GreedyView.hs: info and documentation darcs-hash:20070614143953-32816-28ccd93d69cf7c2688277df88876118c2a226760.gz --- GreedyView.hs | 55 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 20 deletions(-) (limited to 'GreedyView.hs') diff --git a/GreedyView.hs b/GreedyView.hs index 4904fba..a08fc3f 100644 --- a/GreedyView.hs +++ b/GreedyView.hs @@ -1,38 +1,53 @@ {-# OPTIONS -fglasgow-exts #-} --- Maintainer: Spencer Janssen +----------------------------------------------------------------------------- +-- | +-- Module : XMonadContrib.FindEmptyWorkspace +-- Copyright : (c) Spencer Janssen +-- License : BSD3-style (see LICENSE) -- --- greedyView is an alternative to standard workspace switching. When a --- workspace is already visible on another screen, greedyView swaps the +-- 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. -- --- To use GreedyView as your default workspace switcher, +----------------------------------------------------------------------------- + +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 : +-- Add this import: -- --- import XMonadContrib.GreedyView +-- > import XMonadContrib.GreedyView -- -- And replace the function call used to switch workspaces, -- --- this : +-- this: -- --- [((m .|. modMask, k), f i) --- | (i, k) <- zip [0 .. fromIntegral workspaces - 1] [xK_1 ..] --- , (f, m) <- [(view, 0), (shift, shiftMask)]] +-- > [((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)]] +-- > [((m .|. modMask, k), f i) +-- > | (i, k) <- zip [0 .. fromIntegral workspaces - 1] [xK_1 ..] +-- > , (f, m) <- [(greedyView, 0), (shift, shiftMask)]] -- -module XMonadContrib.GreedyView (greedyView) where - -import StackSet as W hiding (filter) -import XMonad -import Operations -import Data.List (find) - greedyView :: WorkspaceId -> X () greedyView = windows . greedyView' -- cgit v1.2.3