Warning, /plasma/libksysguard/scripts/README is written in an unsupported language. File is not indexed.

0001 To create a script:
0002 
0003 * Make a folder here with any name
0004 * Inside create a file with any name, ending .desktop, looking like:
0005 
0006 
0007 [Desktop Entry]
0008 Name=What's this process...
0009 Comment=General information about this program
0010 X-KDE-ServiceTypes=KSysGuard/Script
0011 Type=Service
0012 
0013 You will now get the Name in a context menu when right clicking on a process.  This can be translated by doing  Name[gr]=   etc.
0014 
0015 * Create a main.js file containing javascript code.  This code will be run when the user choses the context menu entry.
0016 * There are the following functions:
0017 
0018 filecontent = readFile("/proc/blah")
0019 
0020 exists = fileExists("/proc/blah")
0021 
0022 setHtml("<html><b>Hi!</b>");
0023 
0024 * For a quick and simple GUI, you can just call "setHtml" which will create a dialog box with a webkit browser.  Subsequent calls to setHtml will replace the html in the same browser widget.
0025 
0026 * If you create a GUI using designer, save the file in the same folder.  Any file ending .ui  will be made accessible to the script, with the variable name
0027 being the filename, with "." replaced with "_".
0028 
0029 e.g. A file called "dialog.ui" with a textbox called 'textBox' can be used like:
0030 
0031 dialog_ui.textBox.text = "Hello";
0032 dialog_ui.show();
0033 
0034 * The following variables are also available to use, with their values set to the process selected:
0035 
0036 process.pid
0037 process.ppid
0038 process.name
0039 process.fullname
0040 process.command