exwm
exwm copied to clipboard
exwm-workspace vs tab-bar-mode
Now that we require Emacs 27.1 it would be worth evaluating which features of exwm-workspace.el are not covered by tab-bar-mode and trying to get them upstreamed, or reimplement them ontop of tab-bar-mode. Personally I don't use the workspace feature, as tab-bar-mode covers my needs.
Notes from a brief review:
| Option/Command | Tab-bar-mode equivalent? | Comments |
|---|---|---|
| exwm-workspace-switch-hook | none | Request upstream; Advise tab-bar-select-tab in mean time? |
| exwm-workspace-warp-cursor | none | Implement in terms of above hook/advice |
| exwm-workspace-minibuffer-position | none | Implement in terms of above hook/advice; remove EXWM restart requirement? |
| exwm-workspace-show-all-buffers | none | Deprecate; suggest use of third party packages (bufferlo, bufler, tabspaces, etc) |
| exwm-workspace-switch/switch-create | tab-bar-switch-to-tab, tab-list, etc | Obsolete/alias to tab-bar equivalent |
| exwm-workspace-swap, exwm-workspace-move | none | Implement in terms of tab-bar-move-tab |
| exwm-workspace-add/delete | tab-bar-new-tab/-close-tab | Implement in terms of tab bar functions |
| exwm-workspace-move-window | tab-bar-move-window-to-tab | Not quite 1:1, but we could request a parameter upstream to allow picking the destination tab |
| exwm-workspace-switch-to-buffer | none | Deprecate in favor of existing buffer switching commands |
| exwm-workspace-switch-attach/detach/toggle-minibuffer | none | Implement in terms of tab-bar-mode? |
exwm-workspace-switch-hook
This now exists as tab-bar-tab-post-select-functions.
exwm-workspace-warp-cursor
We probably need a new exwm-monitor (screens?) module to replace exwm-workspace, but only with respect to multiple monitors. This option would go there.
Honestly, we may want to merge that with randr... but maybe not?
exwm-workspace-minibuffer-position
IMO, we should have a new exwm-floating-minibuffer-mode minor-mode (or just tell users to, e.g., use miniframe and make sure it works well with EWM).
This now exists as
tab-bar-tab-post-select-functions.
Cool. Only available in 30+, though.
We probably need a new exwm-monitor (screens?) module to replace exwm-workspace, but only with respect to multiple monitors. This option would go there.
That sounds like a good idea.
IMO, we should have a new exwm-floating-minibuffer-mode minor-mode (or just tell users to, e.g., use miniframe and make sure it works well with EWM).
I'm a fan of delegating to third-party packages when possible, too.
This is related to #8. I personally use workspaces and would not like them go away. I'm OK with tabs becoming workspaces and frames becoming something else (e.g. monitors). In principle I wouldn't like the number of frames to be restricted to the number of XRandr monitors. I hope I can comment over there soon.
I agree with all proposals above. Some comments:
exwm-workspace-show-all-buffers: this should be removed together withexwm-layout-show-all-buffers. Been meaning to do that for years.- exwm-workspace-switch-attach/detach/toggle-minibuffer: this should be moved to
exwm-monitor
In general, I find it great that this proposal leads to EXWM relying more on Emacs functionality and leaves custom behaviour to it and other packages.
Thank you for working on this.
I'm OK with tabs becoming workspaces and frames becoming something else (e.g. monitors)
:100:
My main goal is to unify them (implement workspaces in terms of tabs). There's still a question of if/when/what to deprecate (to avoid having a bunch of workspace features that just delegate to directly to tab features).
In principle I wouldn't like the number of frames to be restricted to the number of XRandr monitors.
I'd be curious to hear your usecase. The one case I can think of would be floating editor frames (and/or frames on other displays), but that's not covered by workspaces.
Imo, exwm-minibuffer-position can be manipulated by other packages and should be user defined. If they want to use a posframe package or create thier own implementation. It adds additional scope.