<commit_before>-----------------------------------------------------------------------------
-- |
-- Module      :  XMonadContrib.SwapWorkspaces
-- Copyright   :  (c) <NAME> <<EMAIL>>
-- License     :  BSD3-style (see LICENSE)
--
-- Maintainer  :  <NAME> <<EMAIL>>
-- Stability   :  unstable
-- Portability :  unportable
--
-- Lets you swap workspace tags, so you can keep related ones next to
-- each other, without having to move individual windows.
--
-- TODO: add quickcheck props for:
--       * double swap invariant (guarantees no 'loss' of workspaces)
--       * non-swapped ws's invariant
--
-----------------------------------------------------------------------------

module XMonadContrib.SwapWorkspaces (
                                     -- * Usage
                                     -- $usage
                                     swapWithCurrent,
                                     swapWorkspaces
                                    ) where

import StackSet

-- $usage
-- Add this import to your Config.hs:
--
-- > import XMonadContrib.SwapWorkspaces
--
-- Throw this in your keys definition:
--
-- > ++
-- > [((modMask .|. controlMask, k), windows $ swapWithCurrent i)
-- >     | (i, k) <- zip workspaces [xK_1 ..]]

-- %import XMonadContrib.SwapWorkspaces<commit_msg>remove old TODOs (fix darcs conflict)<commit_after>-----------------------------------------------------------------------------
-- |
-- Module      :  XMonadContrib.SwapWorkspaces
-- Copyright   :  (c) <NAME> <<EMAIL>>
-- License     :  BSD3-style (see LICENSE)
--
-- Maintainer  :  <NAME> <<EMAIL>>
-- Stability   :  unstable
-- Portability :  unportable
--
-- Lets you swap workspace tags, so you can keep related ones next to
-- each other, without having to move individual windows.
--
-----------------------------------------------------------------------------

module XMonadContrib.SwapWorkspaces (
                                     -- * Usage
                                     -- $usage
                                     swapWithCurrent,
                                     swapWorkspaces
                                    ) where

import StackSet

-- $usage
-- Add this import to your Config.hs:
--
-- > import XMonadContrib.SwapWorkspaces
--
-- Throw this in your keys definition:
--
-- > ++
-- > [((modMask .|. controlMask, k), windows $ swapWithCurrent i)
-- >     | (i, k) <- zip workspaces [xK_1 ..]]

-- %import XMonadContrib.SwapWorkspaces
{'fraction_non_alphanumeric': 0.23252032520325203, 'fraction_numerical': 0.0016260162601626016, 'mean_word_length': 1.1455972101133391, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7083559', 'n_tokens_mistral': 649, 'n_tokens_neox': 615, 'n_words': 172}