diff options
| author | Josh Rahm <rahm@google.com> | 2022-04-18 16:38:05 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-10-09 12:19:46 -0600 |
| commit | 92e36c9262e7cc2f9ffdb7e45ef9aed43fa1e18c (patch) | |
| tree | 2e23dea6f2f4c45ccd7a8e0f9be5fc5a6da2fb71 /src/Rahm/Desktop/Common.hs | |
| parent | 7f5b461a8dcd8844bb7918c6b9a7ee7d244c4d7c (diff) | |
| download | rde-92e36c9262e7cc2f9ffdb7e45ef9aed43fa1e18c.tar.gz rde-92e36c9262e7cc2f9ffdb7e45ef9aed43fa1e18c.tar.bz2 rde-92e36c9262e7cc2f9ffdb7e45ef9aed43fa1e18c.zip | |
Rename Lang to WindowManagementLanguage (Moved to Wml.hs). Add more features to it.
Diffstat (limited to 'src/Rahm/Desktop/Common.hs')
| -rw-r--r-- | src/Rahm/Desktop/Common.hs | 13 |
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 |