refactor recentWS

Instead of constructing workspaces and rearranging it with tail and
head, construct it in the desired formation directly.
This commit is contained in:
ivanbrennan
2020-03-05 08:53:45 -05:00
parent 53a59d6592
commit 423d70593d

View File

@@ -79,7 +79,9 @@ recentWS :: (WindowSpace -> Bool) -> WindowSet -> [WindowSet]
recentWS p w = map (`view` w) recentTags
where recentTags = map tag
$ filter p
$ tail (workspaces w) ++ [head (workspaces w)]
$ map workspace (visible w)
++ hidden w
++ [workspace (current w)]
cycref :: [a] -> Int -> a