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

Complex Exec doesn't launch #2

Closed
cohoe opened this issue Jun 14, 2020 · 4 comments
Closed

Complex Exec doesn't launch #2

cohoe opened this issue Jun 14, 2020 · 4 comments

Comments

@cohoe
Copy link
Owner

cohoe commented Jun 14, 2020

grant@fedora ~ » grep Exec /var/lib/snapd/desktop/applications/spotify_spotify.desktop 
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/spotify_spotify.desktop /var/lib/snapd/snap/bin/spotify %U

With some debug that's only launching /usr/bin/env BAMF_DESKTOP_FILE_HINT and nothing else. Need to make this parse the entire line.

https://github.com/cohoe/launchy/blob/master/src/plugin_interface.cpp#L199-L217

@cohoe
Copy link
Owner Author

cohoe commented Jun 14, 2020

@cohoe
Copy link
Owner Author

cohoe commented Jun 14, 2020

plugin_interface.cpp runProgram()
main.cpp LaunchyWidget::launchItem()
main.cpp LaunchyWidget::doEnter()
main.cpp LaunchyWidget::keyPressEvent()

What if it's not in the exec but in the catalog?!

@cohoe
Copy link
Owner Author

cohoe commented Jun 14, 2020

diff --git a/platforms/unix/platform_unix.cpp b/platforms/unix/platform_unix.cpp
index e82d7e5..0abb3be 100644
--- a/platforms/unix/platform_unix.cpp
+++ b/platforms/unix/platform_unix.cpp
@@ -175,7 +175,8 @@ void PlatformUnix::alterItem(CatItem* item) {
                 else if (line.startsWith("Icon", Qt::CaseInsensitive))
                     icon = line.split("=")[1].trimmed();
                 else if (line.startsWith("Exec", Qt::CaseInsensitive))
-                    exe = line.split("=")[1].trimmed(); 
+                    //exe = line.split("=")[1].trimmed(); 
+                    exe = line.replace("Exec=", "", Qt::CaseInsensitive).trimmed();

Works but requires two launches for Launchy to disappear.

@cohoe
Copy link
Owner Author

cohoe commented Jun 14, 2020

Only affects first launch. TBH I don't really care about that.

@cohoe cohoe closed this as completed in 997987f Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant