diff options
author | Brent Yorgey <byorgey@gmail.com> | 2008-02-01 19:06:18 +0100 |
---|---|---|
committer | Brent Yorgey <byorgey@gmail.com> | 2008-02-01 19:06:18 +0100 |
commit | 6b4aa7efb8a2a9c82a8610ae8ab25108e32d1e15 (patch) | |
tree | 9478cd5f10b54294cc56dc4cbce04e755f4f620c /XMonad/Actions/RotView.hs | |
parent | a99d18cccbaa0d2c26d4d85b2bf7fb13eb9462c5 (diff) | |
download | XMonadContrib-6b4aa7efb8a2a9c82a8610ae8ab25108e32d1e15.tar.gz XMonadContrib-6b4aa7efb8a2a9c82a8610ae8ab25108e32d1e15.tar.xz XMonadContrib-6b4aa7efb8a2a9c82a8610ae8ab25108e32d1e15.zip |
REMOVE RotView: use CycleWS instead.
See CycleWS docs for info on switching, or just look at the changes to
XMonad.Config.Droundy.
darcs-hash:20080201180618-bd4d7-7b4deec416c0afd7926b44652bd00cfede1e5e17.gz
Diffstat (limited to '')
-rw-r--r-- | XMonad/Actions/RotView.hs | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/XMonad/Actions/RotView.hs b/XMonad/Actions/RotView.hs deleted file mode 100644 index f7c1333..0000000 --- a/XMonad/Actions/RotView.hs +++ /dev/null @@ -1,58 +0,0 @@ ------------------------------------------------------------------------------ --- | --- Module : XMonad.Actions.RotView --- Copyright : (c) David Roundy <droundy@darcs.net> --- License : BSD3-style (see LICENSE) --- --- Maintainer : David Roundy <droundy@darcs.net> --- Stability : unstable --- Portability : unportable --- --- Provides bindings to cycle through non-empty workspaces. --- ------------------------------------------------------------------------------ - -module XMonad.Actions.RotView ( - -- * Usage - -- $usage - rotView - ) where - -import Data.List ( sortBy, find ) -import Data.Maybe ( isJust ) -import Data.Ord ( comparing ) - -import XMonad -import XMonad.StackSet hiding (filter) - --- $usage --- --- NOTE: This module is deprecated; see "XMonad.Actions.CycleWS". --- --- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@: --- --- > import XMonad.Actions.RotView --- --- Then add appropriate key bindings, such as: --- --- > , ((modMask x .|. shiftMask, xK_Right), rotView True) --- > , ((modMask x .|. shiftMask, xK_Left), rotView False) --- --- For detailed instructions on editing your key bindings, see --- "XMonad.Doc.Extending#Editing_key_bindings". - --- | Cycle through non-empty workspaces. True --> cycle in the forward --- direction. Note that workspaces cycle in order by tag, so if your --- workspaces are not in tag-order, the cycling might seem wonky. -rotView :: Bool -> X () -rotView forward = do - ws <- gets windowset - let currentTag = tag . workspace . current $ ws - sortWs = sortBy (comparing tag) - isNotEmpty = isJust . stack - sorted = sortWs (hidden ws) - pivoted = let (a,b) = span ((< currentTag) . tag) sorted in b ++ a - pivoted' | forward = pivoted - | otherwise = reverse pivoted - nextws = find isNotEmpty pivoted' - whenJust nextws (windows . view . tag) |