From c98715623de6fe9afef3f55db3c57b08f4ee2aa0 Mon Sep 17 00:00:00 2001 From: Giacomo Rosin Date: Sat, 31 Aug 2024 16:10:06 +0200 Subject: [PATCH] X.A.DynamicProjects: Don't autodelete projects Fixes #902 by no longer deleting projects on switch, as it is more confusing than useful. --- XMonad/Actions/DynamicProjects.hs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/XMonad/Actions/DynamicProjects.hs b/XMonad/Actions/DynamicProjects.hs index 5907fed423..2d2ac8b328 100644 --- a/XMonad/Actions/DynamicProjects.hs +++ b/XMonad/Actions/DynamicProjects.hs @@ -255,20 +255,7 @@ modifyProject f = do -------------------------------------------------------------------------------- -- | Switch to the given project. switchProject :: Project -> X () -switchProject p = do - oldws <- gets (W.workspace . W.current . windowset) - oldp <- currentProject - - let name = W.tag oldws - ws = W.integrate' (W.stack oldws) - - -- If the project we are switching away from has no windows, and - -- it's a dynamic project, remove it from the configuration. - when (null ws && isNothing (projectStartHook oldp)) $ do - removeWorkspaceByTag name -- also remove the old workspace - XS.modify (\s -> s {projects = Map.delete name $ projects s}) - - appendWorkspace (projectName p) +switchProject p = appendWorkspace (projectName p) -------------------------------------------------------------------------------- -- | Prompt for a project name and then switch to it. Automatically