Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to name workspaces on-the-fly? #916

Open
MountainMan1312 opened this issue Jul 26, 2023 · 4 comments
Open

Is it possible to name workspaces on-the-fly? #916

MountainMan1312 opened this issue Jul 26, 2023 · 4 comments

Comments

@MountainMan1312
Copy link

MountainMan1312 commented Jul 26, 2023

Howdy!

I found this relevant issue on how to setup named workspaces: #716

I'm wondering if there's a way to name additional workspaces upon creating them, instead of a pre-defined list?

Expected behavior

Upon running exwm-workspace-switch and pressing + to add an additional workspace, I should be prompted to enter a name and press RET to create a named workspace.

It would also be okay if I had to create the workspace first, then rename it.

Thanks in advance!

@Stebalien
Copy link
Contributor

You could add a hook to exwm-workspace-list-change-hook that prompts you for a name and adds it to a list.

Personally, for multiple-workspaces, I recommend using the builtin tab-bar package instead of the EXWM workspace feature. You get almost the same functionality (and you get a tab bar!) while using a native feature with better integration. The only thing you can't get is the ability to move workspaces between monitors.

You'll still need to use at least one workspace per monitor, but I usually just assign those statically and never name/change them.

@medranocalvo
Copy link
Collaborator

@MountainMan1312, there is currently no way to name the workspaces via exwm-workspace-switch. I don't use that command myself, but the usual C-x 5 bindings plus the following additions:

(keymap-set ctl-x-5-map "n" 'set-frame-name)
(keymap-set ctl-x-5-map "5" 'select-frame-by-name)

Adding a binding to the exwm-workspace-switch prompt for setting the workspace name could be done. In my opinion this should be invoked by the user after having added the workspace, instead of directly. What could be a good binding? Are there other similar commands we could use for inspiration (e.g. r for tab-rename and rename-buffer)?

@Stebalien, that's very interesting. Are there issues you find when using EXWM that way? For example, when I quickly tested tab-bar I found that floating windows remained no matter which tab was selected (which might be desirable, but differs with respect to EXWM workspaces).

@Stebalien
Copy link
Contributor

Are there issues you find when using EXWM that way? For example, when I quickly tested tab-bar I found that floating windows remained no matter which tab was selected (which might be desirable, but differs with respect to EXWM workspaces).

I never use floating windows, except as transient popups where I actually want them to be sticky. But I can see that being an issue.

@medranocalvo
Copy link
Collaborator

@Stebalien, thank you for the input, we might want to support both behaviours.

@MountainMan1312, any thoughts about #916 (comment)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants