From 6bc6bf8abdbcd1f69f70f9923924ed8c4f99463f Mon Sep 17 00:00:00 2001 From: Giacomo Rosin Date: Sat, 31 Aug 2024 16:42:16 +0200 Subject: [PATCH] X.A.DynamicProjects: Improve documentation Describe how to close projects and the output of `currentProject` function. --- XMonad/Actions/DynamicProjects.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/XMonad/Actions/DynamicProjects.hs b/XMonad/Actions/DynamicProjects.hs index 2d2ac8b32..9778db6f2 100644 --- a/XMonad/Actions/DynamicProjects.hs +++ b/XMonad/Actions/DynamicProjects.hs @@ -69,7 +69,9 @@ import qualified XMonad.Util.ExtensibleState as XS -- the working directory to the one configured for the matching -- project. If the workspace doesn't have any windows, the project's -- start-up hook is executed. This allows you to launch applications --- or further configure the workspace/project. +-- or further configure the workspace/project. To close a project, +-- you can use the functions provided by "XMonad.Actions.DynamicWorkspaces", +-- such as @removeWorkspace@ or @removeWorkspaceByTag@. -- -- When using the @switchProjectPrompt@ function, workspaces are -- created as needed. This means you can create new project spaces @@ -230,7 +232,9 @@ lookupProject name = Map.lookup name <$> XS.gets projects -------------------------------------------------------------------------------- -- | Fetch the current project (the one being used for the currently --- active workspace). +-- active workspace). If the workspace doesn't have a project, a +-- default project is returned, using the workspace name as the +-- project name. currentProject :: X Project currentProject = do name <- gets (W.tag . W.workspace . W.current . windowset)