diff options
Diffstat (limited to '')
-rw-r--r-- | GreedyView.hs | 55 |
1 files changed, 35 insertions, 20 deletions
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 <sjanssen@cse.unl.edu> +----------------------------------------------------------------------------- +-- | +-- Module : XMonadContrib.FindEmptyWorkspace +-- Copyright : (c) Spencer Janssen <sjanssen@cse.unl.edu> +-- 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 <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. -- --- 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' |