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

Unsupported window_type criteria #2906

Closed
makepanic opened this issue Oct 21, 2018 · 2 comments
Closed

Unsupported window_type criteria #2906

makepanic opened this issue Oct 21, 2018 · 2 comments

Comments

@makepanic
Copy link
Contributor

Hi,
thanks for the great work on sway.
With beta.1 i tried to checkout sway again and ported various things from my i3 config to sway.

I noticed that some of the criteria aren't supported, e.g. for_window [window_type="menu"] floating enable won't compile.

Looking at the source, it looks like there's a hardcoded list of supported types

https://github.com/swaywm/sway/blob/master/sway/criteria.c#L278-L290

There are some i3 configs that user additional window_type filters.

If https://metacpan.org/pod/X11::Protocol::WM#_NET_WM_WINDOW_TYPE is correct, then this is the list of possible types:

sway metacpan
NORMAL NORMAL
DIALOG DIALOG
not implemented DESKTOP
not implemented DOCK
TOOLBAR TOOLBAR
not implemented MENU
UTILITY UTILITY
SPLASH SPLASH

Then there's also the freedesktop spec https://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472629520

sway freedesktop
NORMAL NORMAL
DIALOG DIALOG
not implemented DESKTOP
not implemented DOCK
TOOLBAR TOOLBAR
not implemented MENU
UTILITY UTILITY
SPLASH SPLASH
not implemented DROPDOWN_MENU
not implemented POPUP_MENU
not implemented TOOLTIP
not implemented NOTIFICATION
not implemented COMBO
not implemented DND

If this is something sway should support, I could try to open a PR and extend the if/else condition block.
I'm not fluent enough with c so it'll also be fine if someone else does it properly :)

@ascent12
Copy link
Member

A few of these are very X11 specific and wouldn't work in Wayland at all (e.g. DESKTOP, DOCK), but I suppose it's not particularly hard to just add more stuff to that if-else chain.

makepanic added a commit to makepanic/sway that referenced this issue Oct 21, 2018
fixes the parsing part of swaywm#2906
makepanic added a commit to makepanic/sway that referenced this issue Oct 21, 2018
fixes the parsing part of swaywm#2906
@RyanDwyer
Copy link
Member

Fixed by the above PR.

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

No branches or pull requests

3 participants