exwm icon indicating copy to clipboard operation
exwm copied to clipboard

exwm-workspace vs tab-bar-mode

Open progfolio opened this issue 1 year ago • 6 comments

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.

progfolio avatar Jun 05 '24 13:06 progfolio

Notes from a brief review:

Option/CommandTab-bar-mode equivalent?Comments
exwm-workspace-switch-hooknoneRequest upstream; Advise tab-bar-select-tab in mean time?
exwm-workspace-warp-cursornoneImplement in terms of above hook/advice
exwm-workspace-minibuffer-positionnoneImplement in terms of above hook/advice; remove EXWM restart requirement?
exwm-workspace-show-all-buffersnoneDeprecate; suggest use of third party packages (bufferlo, bufler, tabspaces, etc)
exwm-workspace-switch/switch-createtab-bar-switch-to-tab, tab-list, etcObsolete/alias to tab-bar equivalent
exwm-workspace-swap, exwm-workspace-movenoneImplement in terms of tab-bar-move-tab
exwm-workspace-add/deletetab-bar-new-tab/-close-tabImplement in terms of tab bar functions
exwm-workspace-move-windowtab-bar-move-window-to-tabNot quite 1:1, but we could request a parameter upstream to allow picking the destination tab
exwm-workspace-switch-to-buffernoneDeprecate in favor of existing buffer switching commands
exwm-workspace-switch-attach/detach/toggle-minibuffernoneImplement in terms of tab-bar-mode?

progfolio avatar Jun 05 '24 14:06 progfolio

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).

Stebalien avatar Jun 05 '24 15:06 Stebalien

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.

progfolio avatar Jun 05 '24 15:06 progfolio

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 with exwm-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.

medranocalvo avatar Jun 07 '24 16:06 medranocalvo

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.

Stebalien avatar Jun 07 '24 20:06 Stebalien

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.

ethanmoss1 avatar Jun 07 '24 21:06 ethanmoss1