From 423d70593d0e987fac08890b429d42ec403551b1 Mon Sep 17 00:00:00 2001 From: ivanbrennan Date: Thu, 5 Mar 2020 08:53:45 -0500 Subject: [PATCH] refactor recentWS Instead of constructing workspaces and rearranging it with tail and head, construct it in the desired formation directly. --- XMonad/Actions/CycleRecentWS.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/XMonad/Actions/CycleRecentWS.hs b/XMonad/Actions/CycleRecentWS.hs index 8a5158ad..4a67156c 100644 --- a/XMonad/Actions/CycleRecentWS.hs +++ b/XMonad/Actions/CycleRecentWS.hs @@ -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