Open oknozor opened 2 years ago
I think it would be better to have desktop entries ans actions activated by pop-launcher as mentioned here https://github.com/pop-os/launcher/discussions/118
I will try to tackle this soon, and make a PR in pop-shell in parallel.
I updated the desktop entries plugin so it now take care of launching the entries, actions and gpu preferences.
Still need to figure out how to properly handle GPU selection for nvidia though. I don't have an nvidia machine so I won't be able to test this.
Should I implement something like this: https://gitlab.freedesktop.org/hadess/switcheroo-control/-/blob/master/src/switcheroo-control.c#L285 ?
Could you point me in the right direction @mmstick.
Also this will require to remove all the desktop entry related code in pop-shell. I'll send the PR soon.
@mmstick I have started to implement the Gpu switching logic to be able to launch desktop entries with the appropriate gpu (without relying on gnome stuff).
Also launching DE without the gnome helpers requires to implement a small part of the destkop entry spec. I have started to tackle this but it's not completely ready yet.
This is definitely no ready yet but the more I progress on this the more it feels like the desktop entry launching should reside in a separate crate.
I would totally understand if you don't want to change the current behavior of pop-launcher but I'd like to have your take on this, I don't want to spend more time on this if you are not considering to merge whenever it will be ready.
In my opinion removing some gtk/gnome dependencies is worth the effort in the long run.
Pros:
Switcheroo is a great guide for launching with hybrid graphics support.
It's fine to have a separate crate for launching desktop entries. There's multiple locations where it'd make sense to have that, outside of the pop-launcher.
I did took some inspiration from switcheroo, the main difference is that my implementation does not exposes gpu info on dbus, I guess it's fine ?
I was able to get my hand on a hybrid graphics nvidia graphics laptop so I should be able to test it.
This add the ability to use desktop entries actions.
Not sure but, this might break pop-shell front end. Maybe I should add another variant to the
PluginResponse
instead of usingContext
?Also I am wondering if we should implement activation for destkop entries directly in the launcher or still delegate to clients ? (see: https://github.com/pop-os/launcher/discussions/118).