wayfire
wayfire copied to clipboard
Multiple window rules: with "then move" "then assign_workspace" not executed
Describe the bug With those window rules
rule_3 = on created if app_id is "qterminal" then assign_workspace 1 0
rule_4 = on created if app_id is "qterminal" then resize 1924 1022
rule_5 = on created if app_id is "qterminal" then move 0 10
Application will open always on current workspace. Tested also for org.kde.kcolorchooser.
To Reproduce
- Assign "move" and "assign_workspace" (and eventually more rules) to an application
- Open it
- It will not respect "assign_workspace"
- comment "move" rule
- open application, it will respect workspace again.
Expected behavior
All rules are respected.
Screenshots or stacktrace
Wayfire version 0.8.0, git, branch alpha-add-ipc
I have this issue also with move and geometry, workspace doesn't work, but if I comment out geometry, workspace will work. rule_1 = on created if app_id is "Alacritty" then assign_workspace 0 1 rule_2 = on created if app_id contains "Alacritty" then set geometry 500 180 700 550
wayfire -v
0.8.0-c3dac7ee (Oct 1 2022, branch 'HEAD')
Here this happens also with snap but not with resize
rule_10 = on created if app_id is "org.telegram.desktop" then assign_workspace 2 0
rule_11 = on created if app_id is "org.telegram.desktop" then snap right
and telegram is always on 0 0 at startup
Forgot about that, but it's still like that above, but only with telegram and not with element. Dots?
Still the same atm, with those rules "telegram_2" is not executed at startup:
[window-rules]
element_1 = on created if app_id is "Element" then snap left
element_2 = on created if app_id is "Element" then assign_workspace 2 0
telegram_1 = on created if title contains "Telegram" then assign_workspace 2 0
telegram_2 = on created if title contains "Telegram" then snap right
Looking at this again,
rule_3 = on created if app_id is "qterminal" then assign_workspace 1 0 rule_4 = on created if app_id is "qterminal" then resize 1924 1022 rule_5 = on created if app_id is "qterminal" then move 0 10
'of course' qterminal will be moved back to the current workspace: coordinates are relative to the current workspace. By saying move 0 10 you tell it to move to the current workspace. I would first move/resize the view (which can btw be done with a single set_geometry command) and then assign the workspace. Have you tried that?
Actually I'm using another method for qterminal, let the app starting with size I want, so the only issue left is with telegram, but probably the issue with qterminal was that.
If I remember well only one rule works, with both none works, but should test this if true really.
Change the order solve the problem for me, workspace should be at the end. rule_1 = on created if app_id contains "Alacritty" then set geometry 500 180 700 550 rule_2 = on created if app_id is "Alacritty" then assign_workspace 0 1
Change the order solve the problem for me, workspace should be at the end.
Tried with that - same result, snap right isn't executed:
telegram_1 = on created if title contains "telegram" then snap right
telegram_2 = on created if title contains "telegram" then assign_workspace 2 0
Even worse: with
telegram_1 = on created if title is "org.telegram.desktop" then snap right
telegram_2 = on created if title is "org.telegram.desktop" then assign_workspace 2 0
none is executed.
Giving up, as sometimes it isn't even reproducible, atm none of both rules are executed. And also only telegram_2 = on created if app_id contains "Telegram" then assign_workspace 2 0 doesnt work.
lswt
2: ---- "Telegram (47)" org.telegram.desktop
You are comparing title with app_id, you are not considering case sensitive also, "Word" does not exist in "word"
not sure what are you trying to do but that works rule_5 = on created if app_id is "qterminal" then assign_workspace 0 2 rule_4 = on created if app_id is "qterminal" then resize 400 400 rule_3 = on created if app_id is "qterminal" then move 1 0
also some apps like nautilus, has a initial title like "Loading..." then the final title.
consider case sensitive and use app_id instead
Oh that's a good point, @stefonarch you're looking for part of the title in the app-id. That must be why it works for others but not for you.
True. But did just a test with telegram_2 = on created if app_id contains "telegram" then assign_workspace 2 0 and it's not working too.
"Telegram" was probably a leftover from trying with title.
True. But did just a test with
telegram_2 = on created if app_id contains "telegram" then assign_workspace 2 0and it's not working too. "Telegram" was probably a leftover from trying with title.
Did you also reorder the other two window rules to happen alphabetically before the assign workspace one?
True. But did just a test with
telegram_2 = on created if app_id contains "telegram" then assign_workspace 2 0and it's not working too. "Telegram" was probably a leftover from trying with title.
no, this won't work, must be app_id is "org.telegram.desktop"
True. But did just a test with
telegram_2 = on created if app_id contains "telegram" then assign_workspace 2 0and it's not working too. "Telegram" was probably a leftover from trying with title.no, this won't work, must be app_id is "org.telegram.desktop"
contains should work as well?
True. But did just a test with
telegram_2 = on created if app_id contains "telegram" then assign_workspace 2 0and it's not working too. "Telegram" was probably a leftover from trying with title.no, this won't work, must be app_id is "org.telegram.desktop"
contains should work as well?
not working in this case