-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Investigate possibility of implementing of Auto Profile functionality for Wayland #303
Comments
It should be possible. At least in wlroots (the Sway Compositor) matching windows is a little difference than from X. We usually use 3 windows properties:
I will probably be able to implement the functionally on my machine using Sway + AntiMicroX CLI |
Really? That would be great. |
Are there any (popular) DE-s which will not be compatible with your implementation? |
My initial implementation was proven faulty. I could get the profile to change when my target window is created but not when it is switched out or into focus. I will give it a look and try create a more complex script.
Unfortunately I am not capable to answer that question in its full. Sway is a i3 like windows manager so we get a lot of mid level configuration easily available. For other popular desktop environment things would be different. But, for example, Gnome based desktops are using Mutter, which is the same for X and Wayland, so I would imagine that whatever you guys are currently doing for X should work for Wayland with some tweaks. |
I was not aware of that, maybe there are some universal ways of obtaining info about currently opened windows. |
I am not sure whether is it worth your effort to work with solution making this feature available for only small fraction of users. I will try to look for something more universal. |
I understand. I do not intend to send a pull request. It is more of a personal project while you guys can implement the feature. Sorry for not being able to be of greater help. |
At first glance this seems to be not implementable (at least not easily because of security reasons: https://stackoverflow.com/questions/45465016/how-do-i-get-the-active-window-on-gnome-wayland) |
A shame that mutter hasn't implemented the protocol. Although, from what I understood, it is possible through some other (possibly unreliable) Gnome API. I did manage to get it working on my machine using a python script, I will keep it here in case somewhere else is interested and stumble in this thread: My python daemon: https://pastebin.com/raw/2stA0hBv The configuration file (Maps windows to profiles): https://pastebin.com/raw/Jas1KYL6 It is still a naive implementation. I am not experience in writing this type of software and I haven't tested it extensively but it seems to be working fine for my needs. |
This script is a good workaround for sway users. I am closing because it is not implementable (at least for now) 😞 . |
This functionality will be broken until flatpak/wayland will implement any way of getting info about active windows: |
LInked with: #301
Check whether Autoprofile Functionality is doable with wayland API.
If yes then implement it, if no make visible note about it in app.
UPDATE
This functionality will be broken until flatpak/wayland will implement any way of getting info about active windows:
You can track the progress of this task here flatpak/xdg-desktop-portal#304 (but there is a very low chance of getting it anytime soon)
Upvote & Fund
The text was updated successfully, but these errors were encountered: