Issue 429 in xmonad: X.A.DynamicWorkspaces command to delete specified tag

Status: New Owner: ---- New issue 429 by jjfoe...@earthlink.net: X.A.DynamicWorkspaces command to delete specified tag http://code.google.com/p/xmonad/issues/detail?id=429 X.A.DynamicWorkspaces contains 'removeWorkspace' which deletes the current workspace. It would be useful to me to have a similar command with which I could delete any workspace by name. I would use this to write a 'workspaces cleanup' procedure that auto-deletes empty auxiliary workspaces.

Updates: Status: Patch Labels: Type-Enhancement Priority-Low Component-Contrib Comment #1 on issue 429 by vogt.a...@gmail.com: X.A.DynamicWorkspaces command to delete specified tag http://code.google.com/p/xmonad/issues/detail?id=429 Jeff Johnson had a similar request here: http://www.haskell.org/pipermail/xmonad/2012-December/013339.html In some off-list discussion the solution was to add to the configuration something like: logHook = removeEmptyWorkspace Something I suggested (but turned out unnecessary) is a handleEventHook that stops workspaces from being removed if you switch to them: http://hpaste.org/79821 If there's any interest, we could add that hpaste to an existing or new contrib module.

Comment #2 on issue 429 by johnnysp...@gmail.com: X.A.DynamicWorkspaces command to delete specified tag http://code.google.com/p/xmonad/issues/detail?id=429 I was just about done implementing and testing the change as originally requested, since that seemed to be fairly easy to do. But if it's better done with a hook, then never mind. However, I think that part of the change I made can be useful anyway, since it gets rid of the totally arbitrary (as far as I can tell) restriction on X.A.DynamicWorkspaces.removeWorkspace' that makes it only work on the first of the hidden workspaces. It's the first of the two patches in the attached file, and I'm not sure if it's idiomatic Haskell (suggestions welcome!), but it appears to work. Attachments: removeWorkspaceByTag.dpatch 23.0 KB

Updates: Status: Verified Comment #3 on issue 429 by vogt.a...@gmail.com: X.A.DynamicWorkspaces command to delete specified tag http://code.google.com/p/xmonad/issues/detail?id=429 I've pushed your patch. I can't really speak for what is idiomatic, but I think it might be cleaner if DynamicWorkspaces had more definitions which are (WindowSet -> WindowSet), and then you could define an unrestricted `removeWorkspaceByTag' in terms of the restricted one and other functions like XMonad.StackSet.view. Maybe some people depend on removeWorkspaceByTag having that restriction, but I doubt people will complain.
participants (1)
-
codesite-noreply@google.com