wasamasa / eyebrowse

A simple-minded way of managing window configs in emacs
GNU General Public License v3.0
437 stars 24 forks source link

Add an option for an "empty" window config for unused workspaces #23

Closed Benaiah closed 9 years ago

Benaiah commented 9 years ago

In i3wm, if you switch to a workspace you haven't put a window on yet, it displays nothing. In the current eyebrowse implementation, when you switch to a workspace you haven't yet done anything with, it assigns whatever your current window config is to that workspace. While this is a workflow that makes sense, it would allow for greater consistency with i3 if there was an "empty" window config that would populate each workspace that you haven't used. This could just be an option, eg. (setq eyebrowse-empty-workspaces t) or something to that effect. For the actual contents of the default window config, since Emacs does not support not actually displaying anything, I propose a single window displaying the *scratch* buffer.

wasamasa commented 9 years ago

That should be pretty doable, although I need to rewrite a bit more code than usual (and maybe use that chance to implement ERT tests to check whether any change is breaking existing behaviour) since it assumes that new configs just copy the last one.

Doing it as customization option (which is off per default) sounds good to me, I'm less sure about its name. How about eyebrowse-initialize-new-workspace which will clean up new workspaces when set to t and otherwise clone the last one? Or a eyebrowse-clone-new-workspace which is t by default and can be set to nil to clean up the new workspace?

*scratch* sounds good as candidate for the cleaned up view considering it's already special-cased in Emacs.

Benaiah commented 9 years ago

I agree about the name - I like the clone one particularly.

wasamasa commented 9 years ago

Feel free to test this by setting eyebrowse-new-workspace to t. It also supports specifying a buffer name to switch to or function name to funcall.