aboutsummaryrefslogtreecommitdiff
path: root/src/Internal/Lib.hs
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2022-03-28 23:27:45 -0600
committerJosh Rahm <joshuarahm@gmail.com>2022-10-09 12:19:45 -0600
commitc75c5f8254181242a96f3f6652a53cc70f40b13e (patch)
treea4df88d0c9d98d3ba7513bc6c679c80a96c112e0 /src/Internal/Lib.hs
parent4b448be1c8c4cc1d973561f94b4527962d09bdd7 (diff)
downloadrde-c75c5f8254181242a96f3f6652a53cc70f40b13e.tar.gz
rde-c75c5f8254181242a96f3f6652a53cc70f40b13e.tar.bz2
rde-c75c5f8254181242a96f3f6652a53cc70f40b13e.zip
Fix things that Hlint is complaining about.
Diffstat (limited to 'src/Internal/Lib.hs')
-rw-r--r--src/Internal/Lib.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Internal/Lib.hs b/src/Internal/Lib.hs
index 3beb640..d8784ea 100644
--- a/src/Internal/Lib.hs
+++ b/src/Internal/Lib.hs
@@ -47,7 +47,7 @@ data WorkspaceState = Current | Hidden | Visible
getPopulatedWorkspaces ::
(Ord i) => S.StackSet i l a sid sd -> [(WorkspaceState, S.Workspace i l a)]
getPopulatedWorkspaces (S.StackSet (S.Screen cur _ _) vis hi _) =
- sortBy (comparing (tag . snd)) $
+ sortOn (tag . snd) $
mapMaybe (\w@(S.Workspace _ _ s) -> fmap (const (Hidden, w)) s) hi ++
map (\(S.Screen w _ _) -> (Visible, w)) vis ++
[(Current, cur)]
@@ -93,10 +93,10 @@ swapWorkspace toWorkspaceName = do
windows $ \ss -> do
let fromWorkspace = tag $ workspace $ current ss
toWorkspace = [toWorkspaceName] in
- (StackSet (swapSc fromWorkspace toWorkspace $ current ss)
+ StackSet (swapSc fromWorkspace toWorkspace $ current ss)
(map (swapSc fromWorkspace toWorkspace) $ visible ss)
(map (swapWs fromWorkspace toWorkspace) $ hidden ss)
- (floating ss))
+ (floating ss)
where
swapSc fromWorkspace toWorkspace (Screen ws a b) =
Screen (swapWs fromWorkspace toWorkspace ws) a b
@@ -125,7 +125,7 @@ getString = runQuery $ do
relativeWorkspaceShift :: Selector -> X ()
relativeWorkspaceShift (Selector selector) = do
windows $ \ss ->
- let tags = sort $ (tag . snd <$> filter (\x -> fst x /= Visible ) (getPopulatedWorkspaces ss))
+ let tags = sort (tag . snd <$> filter (\x -> fst x /= Visible ) (getPopulatedWorkspaces ss))
from = tag $ workspace $ current ss
to = selector from tags
in greedyView to ss
@@ -144,7 +144,7 @@ prev = Selector $ \a l ->
withScreen :: (WorkspaceId -> WindowSet -> WindowSet) -> Int -> X ()
withScreen fn n = do
windows $ \windowSet ->
- case (getHorizontallyOrderedScreens windowSet !! n) of
+ case getHorizontallyOrderedScreens windowSet !! n of
Nothing -> windowSet
Just screen -> fn (tag $ workspace screen) windowSet