![]() |
How to make a launcher for a shell script
Disclaimer: I posted this yesterday on SFOS forums but it got hijacked.
It’s easy to add a custom launcher to your app menu, just drop a <something>.desktop file in ~/.local/share/applications that might look like this: Code:
[Desktop Entry] How can I avoid that? I don't really need a cover tile at all. The script sends notifications, that's enough. I tried from within the .desktop file - all those commented options: Code:
#X-Nemo-Application-Type=generic Maybe there’s some command I can add to the shell script just before it exits? I have been looking around existing projects and installed apps' .desktop files, but nothing seems to adress the situation. |
Re: How to make a launcher for a shell script
I have no idea and wonder if there's even a way or if it is part of silica behaviour.
Even for app's covers, there doesn't seem to be delay/timeout properties. I fell on this looking for "cover" timeout or delay: https://sailfishos.org/develop/docs/...he-home-screen Hijacked? It is not against your question. Maybe you should insist a bit... |
Re: How to make a launcher for a shell script
Basically I'd want something telling the home screen (?) that the app is finished, done, not to bother with it anymore, forget about it.
A shell command would be nice, but I'm open to other suggestions. I have terms like dbus-send and invoker swirling around my brain, but nothing makes sense. |
Re: How to make a launcher for a shell script
It's cheating but what happens if you run the script as an argument to the terminal app and exit at the end?
|
Re: How to make a launcher for a shell script
Quote:
Then it minimizes. If I then tap the cover again, it executes the script again, and this time the helpful message appears, and the terminal does not minimize again... It would have been a good idea if fingerterm a) could be made to minimize straight away and b) would behave more consistently... |
Re: How to make a launcher for a shell script
Running it through a terminal works better with ToeTerm, but I'm still not satisfied with the result.
Frankly I'd still prefer for the launcher to not create a cover tile at all, just show the notifications. |
Re: How to make a launcher for a shell script
Does prefixing
Quote:
I noticed @nas gave an example .desktop file using this here |
Re: How to make a launcher for a shell script
Unfortunately it doesn't make a difference.
Thanks for the example, it suffers the same limitations as discussed here but the dbus notification method is cool to have nonetheless. I've been faffing around with all sorts of settings inside the .desktop file, starting the script with invoker etc. and many fail. The pointless cover is at least succesful. Short of getting the SDK and compiling a shell wrapper, or learning how to register my script with dbus and launch it via dbus, I see no solution. |
Re: How to make a launcher for a shell script
You could use shc to compile the script to binary.
I cant recall if thats available on SailfishOS, but otherwise, its fairly simple. Sources for shc is available so if its not already in repositories, it Can be compiled and used. https://github.com/neurobin/shc |
Re: How to make a launcher for a shell script
Does that mean "Shell to C"?
This is gorgeous! edit: didn't find any shc in openrepos though :( |
All times are GMT. The time now is 10:46. |
vBulletin® Version 3.8.8