aboutsummaryrefslogtreecommitdiff
path: root/src/Rahm/Desktop/Common.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Rahm/Desktop/Common.hs')
-rw-r--r--src/Rahm/Desktop/Common.hs13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/Rahm/Desktop/Common.hs b/src/Rahm/Desktop/Common.hs
index 5a5aecf..c12322a 100644
--- a/src/Rahm/Desktop/Common.hs
+++ b/src/Rahm/Desktop/Common.hs
@@ -57,13 +57,6 @@ instance XPrompt WinPrompt where
showXPrompt _ = "[Window] "
commandToComplete _ = id
-fuzzyCompletion :: String -> String -> Bool
-fuzzyCompletion str0 str1 =
- all (`isInfixOf`l0) ws
- where
- ws = filter (not . all isSpace) $ words (map toLower str0)
- l0 = map toLower str1
-
getString :: Window -> X String
getString = runQuery $ do
t <- title
@@ -88,6 +81,12 @@ gotoWorkspace wid = do
addHiddenWorkspace wid
windows $ S.greedyView wid
+moveLocationToWorkspace :: Location -> WorkspaceId -> X ()
+moveLocationToWorkspace (Location _ (Just win)) wid = do
+ addHiddenWorkspace wid
+ windows $ shiftWin wid win
+moveLocationToWorkspace _ _ = return ()
+
getCurrentWorkspace :: X WorkspaceId
getCurrentWorkspace = withWindowSet $
\(S.StackSet (S.Screen (S.Workspace t _ _) _ _) _ _ _) -> do