-
Notifications
You must be signed in to change notification settings - Fork 15
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
Support assigning programs to workspaces #31
Comments
I was looking for that feature as well and was wondering why the naming scheme is what it is. I haven't looked at the code; maybe it is obvious. Just from observing the it looks like every group has a big number 100100, 100200, etc. and the current selected one is 100000. So I assume the ids are build like this: So if you drop 100000 lots of native commands would work again for the current workspace (this wouldn't close this issue if you want to support assigning to specific workspaces but it might open other possibilities) Workspaces would be named like this:
PS: Would probably also make it possible to up the group and workspace limits if i3 ids were the limitation here – not that one would use all of them 😂 |
The 100000 is coming from the monitor index. Are you using multiple monitors? Monitor 1:
Monitor 2:
|
🤦 Apparently I only tested on my second monitor, sorry. It's even in the REAME... |
So I have three special workspaces:
Stupid question: I mentioned that just naming a workspace a certain way will not make it work with ws_array = workspace_name.split(":")
global_id = ws_array[0]
local_id = ws_array[-1]
if len(ws_array) > 2:
name = ws_array[-2]
if len(ws_array) == 4:
group_name = ws_array[1] I suspect something more complicated at play. Characters I don't see or maybe the groups colon in not the same colon or something... |
Thanks for the explanation! Re the workspace name parsing, it's very similar to what you described, but the splitting is actually done by a Unicode Zero Width Space. This way, parsing is slightly easier because you always expect to have 5 sections/fields, and you can also have colons if the sections (group, workspace name) if you want. For more details see the comment at the top of https://github.com/infokiller/i3-workspace-groups/blob/master/i3wsgroups/workspace_names.py. The problem with assigning programs to workspaces is that the workspace names in i3-workspace-groups are dynamic. They can change because the global number (what you called To solve this, I will need to add another daemon like |
Just some notes which might be relevant for this issue. Usual way how to assign:
But since some programs, like Spotify, have a buggy X11 implementation(?) it needs to be done like this:
Something similar can be achieved with i3-workspace-groups (right now):
But:
|
@Syphdias I added support for the |
@Syphdias I tried your solution but with many workspaces the behaviour is completely random...
gives me everything moving to random workspaces whenever a new app pops up |
What I did not think about when suggesting the solution was that |
yep, there really doesn't seem a way to do that actually statelessly.. |
From #30
i3 supports this, but it won't work correctly with workspace groups because the workspace names are changed for ordering the groups.
The text was updated successfully, but these errors were encountered: