From 92e36c9262e7cc2f9ffdb7e45ef9aed43fa1e18c Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Mon, 18 Apr 2022 16:38:05 -0600 Subject: Rename Lang to WindowManagementLanguage (Moved to Wml.hs). Add more features to it. --- src/Rahm/Desktop/Common.hs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/Rahm/Desktop/Common.hs') 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 -- cgit