aboutsummaryrefslogtreecommitdiff
path: root/src/Internal/Marking.hs
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2021-11-12 13:08:24 -0700
committerJosh Rahm <rahm@google.com>2021-11-12 13:08:24 -0700
commit389950cb75a818f958f0df0b3a43365934a7c07a (patch)
tree55047421e937bd0b289b893fce8572c9a0716ded /src/Internal/Marking.hs
parent01413256aeccdbfbbea1c10c2688322af8c8dc54 (diff)
downloadrde-389950cb75a818f958f0df0b3a43365934a7c07a.tar.gz
rde-389950cb75a818f958f0df0b3a43365934a7c07a.tar.bz2
rde-389950cb75a818f958f0df0b3a43365934a7c07a.zip
Change swapMaster.
Swap master now swaps the master window with the prior master window if swapMaster is called while the master window is focused.
Diffstat (limited to 'src/Internal/Marking.hs')
-rw-r--r--src/Internal/Marking.hs17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/Internal/Marking.hs b/src/Internal/Marking.hs
index 229ea02..fc1c082 100644
--- a/src/Internal/Marking.hs
+++ b/src/Internal/Marking.hs
@@ -1,6 +1,7 @@
{-# LANGUAGE ScopedTypeVariables #-}
module Internal.Marking where
+import Internal.Windows (mapWindows)
import XMonad
import XMonad.StackSet hiding (focus)
import Data.IORef
@@ -57,22 +58,6 @@ jumpToMark mark = do
saveLastMark
focus w
-mapWindows :: (Ord a, Ord b) => (a -> b) -> StackSet i l a s sd -> StackSet i l b s sd
-mapWindows fn (StackSet cur vis hid float) =
- StackSet
- (mapWindowsScreen cur)
- (map mapWindowsScreen vis)
- (map mapWindowsWorkspace hid)
- (Map.mapKeys fn float)
- where
- mapWindowsScreen (Screen work a b) = Screen (mapWindowsWorkspace work) a b
- mapWindowsWorkspace (Workspace t l stack) =
- Workspace t l (fmap (mapStack fn) stack)
-
--- | What genius decided to hide the instances for the Stack type!!???
-mapStack :: (a -> b) -> Stack a -> Stack b
-mapStack fn (Stack focus up down) = Stack (fn focus) (map fn up) (map fn down)
-
setFocusedWindow :: a -> StackSet i l a s sd -> StackSet i l a s sd
setFocusedWindow
window