aboutsummaryrefslogtreecommitdiff
path: root/src/Rahm/Desktop/Common.hs
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2022-04-18 16:38:05 -0600
committerJosh Rahm <rahm@google.com>2022-04-18 16:38:05 -0600
commit75886bd10e782425179f244d0a650d9861bc2843 (patch)
tree2e23dea6f2f4c45ccd7a8e0f9be5fc5a6da2fb71 /src/Rahm/Desktop/Common.hs
parent8b6c4a54f79b35ba153acf6dd6b6f1804237c545 (diff)
downloadrde-75886bd10e782425179f244d0a650d9861bc2843.tar.gz
rde-75886bd10e782425179f244d0a650d9861bc2843.tar.bz2
rde-75886bd10e782425179f244d0a650d9861bc2843.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.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