RedBearAK / toshy

Keymapper config to make Linux work like a 'Tosh!
https://toshy.app
GNU General Public License v3.0
226 stars 15 forks source link

(Enh) Support new wlroots-based Pop!_OS COSMIC desktop environment #301

Open wramalho opened 1 week ago

wramalho commented 1 week ago

Is your feature request related to a problem? Please describe. There is not support for COSMIC.

Describe the solution you'd like It would be nice to have support for COSMIC when it gets to alpha state.

RedBearAK commented 1 week ago

@wramalho

As far as I know the new COSMIC uses the wlroots Wayland compositor. Until someone can help me figure out how to get the window context info (app class, window title of active window) from Python, there won't be any support for the app-specific keymapping, so Toshy would be pretty useless.

There's a module for the keymapper xremap for wlroots compositors, but it's written in Rust and I haven't succeeded in porting it to Python, even with lots of help from GPT-4.

https://github.com/xremap/xremap/blob/43eb7fbdec5a466c8c51e6ac3cb9a5420c5ac05d/src/client/wlroots_client.rs

There are no good references I've been able to find on how to use the necessary wlr_foreign_toplevel_management_unstable_v1 protocol from Python.

It should be possible at some point. I just don't know how to do it yet.