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

i3 assign app to workspace #4

Closed
cyrinux opened this issue Feb 5, 2018 · 10 comments
Closed

i3 assign app to workspace #4

cyrinux opened this issue Feb 5, 2018 · 10 comments

Comments

@cyrinux
Copy link
Sponsor

cyrinux commented Feb 5, 2018

Hi Maxim,
Do you allready try and succeed to assign a app to a specific workspace when using i3-autoname-workspace.py?
I have weird behavior
Regards

@maximbaz
Copy link
Owner

maximbaz commented Feb 5, 2018

Hey, i3-autoname-workspace.py is only about renaming workspaces, to assign app icons to the workspaces like that:

image

As for assigning apps to specific workspaces, this is supported by pure i3, it is done here:

dotfiles/.i3/config

Lines 18 to 24 in 57e538c

for_window [class="Google-chrome"] move container to $workspace2, title_format "Google Chrome"
for_window [class="Chromium"] move container to $workspace2, title_format "Chromium"
for_window [class="Wire"] move container to $workspace3
for_window [class="Slack"] move container to $workspace3
for_window [class="Thunderbird"] move container to $workspace4
for_window [instance="TeamViewer.exe"] move container to $workspace9, floating enable
for_window [class="xfreerdp"] move container to $workspace9

@cyrinux
Copy link
Sponsor Author

cyrinux commented Feb 5, 2018

Hmm, I will retry, thanks Maxim for your quick and complete reply yet.
I have missing something during previous test I thinks. Shame on me, I use to use i3.

@cyrinux
Copy link
Sponsor Author

cyrinux commented Feb 6, 2018

Maxim, I think I have find what was my initial problem.
I have retry your rules, and it's work like a charm, but:

  • I lose icon for floating app, like teamviewer for example. Is it an expected behavior?

2018-02-06-083300_402x154_scrot

@maximbaz
Copy link
Owner

maximbaz commented Feb 6, 2018

I experience this too, but I never cared enough to investigate the cause 🙂 It was working for some time, and then with one of the i3wm upgrades it stopped working. If you want to investigate yourself, here's some info:

The i3-autoname-workspaces.py cannot find floating windows. Querying for all windows is happening here:

for ws_index, workspace in enumerate(i3.get_tree().workspaces()):
name_parts = parse_workspace_name(workspace.name)
name_parts['icons'] = ' '.join(
[icon_for_window(w) for w in workspace.leaves()]) + ' '

So the problem is either in i3 itself, or in i3ipc-python - the library that is used for communicating with i3 API.

If you find a solution, let me know 🙂

@cyrinux
Copy link
Sponsor Author

cyrinux commented Feb 6, 2018

Thanks for info, i will search

@cyrinux
Copy link
Sponsor Author

cyrinux commented Feb 6, 2018

For the moment I can say it works with i3ipc tag v1.3.0 and i3 4.14.1, current archlinux i3ipc version is git r173.1516924861.99cbe2a-1

@acrisci
Copy link

acrisci commented Feb 11, 2018

Try with the latest version I just released, 1.4.0, and let me know if it fixes it.

@cyrinux
Copy link
Sponsor Author

cyrinux commented Feb 11, 2018

Sorry @acrisci the issue seems to be still here, what can I do for help you?

@maximbaz
Copy link
Owner

Fixed in the upstream 🎉

@cyrinux
Copy link
Sponsor Author

cyrinux commented Feb 14, 2018 via email

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

No branches or pull requests

3 participants