-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add an API to launch desktop entries #5
base: main
Are you sure you want to change the base?
Conversation
60a6abf
to
4919bcb
Compare
Just added desktop entry actions, let me know if anything needs to be changed. |
Seems fine, but should we also support async zbus calls? |
We could easily add an async api with zbus async calls and tokio::process instead of std::process. I am not sure if this would be useful though. Most of the time you just want to launch one entry and exit. |
@mmstick is there something more I can do ? |
Has this been integrated into the pop-launcher/pop-shell PR? |
Hey! Is this ready to merge yet? Would love to use it. |
@mmstick - Is this ready to go? I've been using this - it's worked well. Would love to have an official release. |
FWIW - I don't use this library for launching apps directly and would like such feature to live under a "feature" to avoid any extra dependency. (Though I'm not sure if this repository is still maintained.) |
This library is maintained. It is a dependency of the COSMIC desktop. |
Related to pop-os/launcher#119
This PR add a a method to launch desktop entries either via dbus or shell commands.
When launching an entry with the
prefer_non_default_gpu
option, the discrete gpu should be used either by passing the corresponding environment variables to the sub shell or via dbus.I am not 100% confident regarding the gpu implementation since I don't have every hybrid graphics laptop available (only AMD discrete and integrated gpus), feedback would be appreciated here.
There are fake desktop entries launching
glxgears -info
in the ignored tests, this should be enough to test the expected gpu is used. (see https://github.com/oknozor/freedesktop-desktop-entry/blob/33f2d16b731ed80258959b2bd859fc3056d52441/src/exec/mod.rs#L252)For the implementation to be complete we would need a
launch_action
method. I'll implement this after this PR has been reviewed.