X.A.DynamicProjects: No longer autodelete dynamic projects #903
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
No longer autodelete projects when switching to another project from an empty workspace. This fixes #902 where static workspaces would be deleted when switching to a dynamic project. Moreover, it's a more intuitive behaviour, where the user can decide when to close a project.
I considered adding a function to delete projects, but upon further reflection, I realized it's unnecessary and could cause issues. In fact, the only projects stored in the state are those statically defined in
xmonad.hs
(the truly dynamic projects are just dynamic workspaces), and deleting them would render them unusable.To close projects, the existing
removeWorkspace
function (and similar) from theDynamicWorkspaces
module already provides the needed functionality (delete the workspace associated to a project). So, I also briefly documented how to close projects.Checklist
I've read CONTRIBUTING.md
I've considered how to best test these changes (property, unit,
manually, ...) and concluded: Manually: seems to work fine.
I updated the
CHANGES.md
file