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

Move windows to a new workspace (move window to workspace --new) #3732

Open
marcosnils opened this issue Jul 11, 2019 · 6 comments

Comments

Projects
None yet
3 participants
@marcosnils
Copy link

commented Jul 11, 2019

I'm submitting a…

[ ] Bug
[x] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

First of all apologies if this is not the place to ask this question. I've tried to reach someone in IRC but even though the channel is filled, I didn't get any answers and it doesn't have archive to check if someone eventually responded.

What I'm trying to do is to use for_window to open the selected window in a new empty workspace. Reading through the docs, the only options are move, next, prev, etc but I couldn't find a way to send the container to a new pristine workspace.

Is such feature available?

Thx in advance.

@i3bot i3bot added the enhancement label Jul 11, 2019

@Airblader

This comment has been minimized.

Copy link
Member

commented Jul 11, 2019

You can use for_window to mark the window or send it to some special workspace, then write a script using the IPC that listens for the mark / workspace, figures out which (new) workspace to send it to and do it.

You can also cut out the for_window part and have the script do everything if for example you want to do it for all windows anyway.

@marcosnils

This comment has been minimized.

Copy link
Author

commented Jul 11, 2019

thx @Airblader how about suggesting a feature to make for_window do such action by default?
i.e for_window [class="^evil-app$"] floating enable, move container to workspace new
this is exactly what I'm looking for.

If you think it might be a good idea, with some guidance I can give it a try..

@Airblader

This comment has been minimized.

Copy link
Member

commented Jul 11, 2019

There are two problems with that:

  1. The syntax is ambiguous. It already works, but it would move it to a workspace named "new".
  2. It's entirely unclear how to name such a new workspace and users would most likely want to use different ways of naming them. This poses a high risk of feature creep.

I also don't think the usecase here is crazy big, so before investing the complexity of a new feature I'd go with a script and see if the feature request accumulates interest.

@marcosnils

This comment has been minimized.

Copy link
Author

commented Jul 11, 2019

  1. The syntax is ambiguous. It already works, but it would move it to a workspace named "new".

right. Isn't that the same with the prev, next? Those are special cases, so if you name a workspace next or prev it wouldn't move it to that workspace but instead use the built-in support for that.

2. It's entirely unclear how to name such a new workspace and users would most likely want to use different ways of naming them. This poses a high risk of feature creep.

Agree. Maybe assign a number? Just doing some quick brainstorming here.

I also don't think the usecase here is crazy big, so before investing the complexity of a new feature I'd go with a script and see if the feature request accumulates interest.

Yep, that's correct. I just wanted to know if there was some built-in support for that. I guess I'll just script it out and we'll see if it gets any attention. Thx for your input and taking the time to respond.

@Airblader

This comment has been minimized.

Copy link
Member

commented Jul 11, 2019

Isn't that the same with the prev, next?

Technically, yes, you're right. :-) But those are already there, while adding a new reserved word could in theory break for users (for example if they have such a script already). Using something like --new instead would easily solve this minor issue, though.

@Airblader

This comment has been minimized.

Copy link
Member

commented Jul 11, 2019

(Pressed Enter too quickly)

Maybe assign a number?

Yes, but my concern is that we'd likely quickly have users wanting different things here and if the feature cannot even be used by all those who want to use it it becomes even less useful.

@Airblader Airblader changed the title Allow to open container in new workspace with for_window Move windows to a new workspace (move window to workspace --new) Jul 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.