![]() Registered Member ![]()
|
Hi,
I've decided to have a play with plasmoid development, and have a few ideas of itches I want to scratch. I've had a read on the documentation but I think I'm missing a few things. Anyway, I figured I'd ask them here. First, is there any information anywhere on writing plasmoids that live in the panel? How about those that can live both in the panel and on the desktop, including looking different in those two situations? Is it possible for a plasmoid to launch a process in the background (i.e. run a command)? Ideally I'd like to be notified when the process ends, and what the status code was. Even more ideal would be access to the process' output (STDOUT and STDERR). I've seen the LaunchApp extension, but it doesn't appear to put the process into the background, or return status codes or output. Is it possible for a plasmoid to "tail" a file (i.e. a log file)? Would this be a data engine, and if so does one already exist that would be suitable? (i.e. a log watcher) Is there any mechanism in place for creating temporary files (i.e. each plasmoid getting its own separate directory from the API), or should that be done explicitly somewhere under /tmp or /var/tmp? I've been looking at the javascript plasmoid API reference. Is it possible that some of the things I'm wanting to do just aren't possible using javascript, and if so what language would be recommended? I'm sure that I'll have more questions as I shake off my newbie wings, but these will really help for a start. ![]() Thanks! Russ. |
![]() Administrator ![]()
|
For Applets which behave differently in the Panel than the Desktop, you may be interested in Plasma::PopupApplet.
For running a command, you can use KProcess or QProcess. Providing information of any kind should be done in a Plasma::DataEngine. Changing that data should be done through a Plasma::Service object. To create temporary files, use QTemporaryFile. Note that the information provided above is from a C++ prospective, but will also work in the "scripted" languages such as Python. The JavaScript API may not support the components you need.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Thanks for your reply bcooksley. It looks like it's not possible to do these things without using C++, which is a shame since nothing I'm thinking is particularly intensive and so would be ideally suited to a scripted language.
Oh well, I get to learn either way. ![]() Thanks again! |
Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]