module XMonad.Actions.DwmPromote (
dwmpromote
) where
import XMonad
import XMonad.StackSet
dwmpromote :: X ()
dwmpromote :: X ()
dwmpromote = (WindowSet -> WindowSet) -> X ()
windows ((WindowSet -> WindowSet) -> X ())
-> (WindowSet -> WindowSet) -> X ()
forall a b. (a -> b) -> a -> b
$ (Stack Window -> Stack Window) -> WindowSet -> WindowSet
forall a i l s sd.
(Stack a -> Stack a) -> StackSet i l a s sd -> StackSet i l a s sd
modify' ((Stack Window -> Stack Window) -> WindowSet -> WindowSet)
-> (Stack Window -> Stack Window) -> WindowSet -> WindowSet
forall a b. (a -> b) -> a -> b
$
\Stack Window
c -> case Stack Window
c of
Stack Window
_ [] [] -> Stack Window
c
Stack Window
t [] (Window
x:[Window]
rs) -> Window -> [Window] -> [Window] -> Stack Window
forall a. a -> [a] -> [a] -> Stack a
Stack Window
x [] (Window
tWindow -> [Window] -> [Window]
forall a. a -> [a] -> [a]
:[Window]
rs)
Stack Window
t [Window]
ls [Window]
rs -> Window -> [Window] -> [Window] -> Stack Window
forall a. a -> [a] -> [a] -> Stack a
Stack Window
t [] ([Window]
ys [Window] -> [Window] -> [Window]
forall a. [a] -> [a] -> [a]
++ Window
x Window -> [Window] -> [Window]
forall a. a -> [a] -> [a]
: [Window]
rs) where (Window
x:[Window]
ys) = [Window] -> [Window]
forall a. [a] -> [a]
reverse [Window]
ls