On Wednesday, November 10, 2010, Chani wrote: > the latter - what I was asking was, *what* scripting can do it?
there isn't anything in the javascript that can do this right now, no. it would be easy to add API for it, though, and i'm happy to do so as long as we have a use case .. which we do. so. the start of a scope definition: It should be possible to check for the existence of a given application or service. questions, with my snap decision answers in parentheses afterwards: * should it be necessary to search by keyword, category, etc? (i don't think so) * how about generic name? (perhaps) * the name in the .desktop file? (e.g. Battle Ship vs kbattleship) * case sensitive if refering to the executable name on disk? (i think so, though only because this makes the implementation trivial) * how about get the default application (web browser, e.g.)? (yes) * return the path to the executable found? (could be added, but i can't think of a valid use case for it at the moment) so perhaps a small set of methods: bool applicationExists(String name) -> searches $PATH as well as .desktop files String defaultApplication(String kind) -> returns the desktop entry or the executable if none exists of the default app, if any (e.g. terminal, web browser, email, etc) Array[String] matchingApplications(String name, String category, Array[String] keywords) <-- not sure about this one, but maybe useful? hm. as an aside: a variation on the icon plasmoid that represents a default application would be very cool imho. imagine an instance of the plasmoid set to show the "web browser" which would change its icon and what it launches based on the desktop setting? -- Aaron J. Seigo humru othro a kohnu se GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43 KDE core developer sponsored by Qt Development Frameworks
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel