![]() | Useractions |
Prev | Krusader Tools | Next |
With the useraction-system the user can make its own actions on files in the panel or to access krusader-internal functions with parameter directly using placeholder. The actions integrate seamless into KDE's action-system, so the standard edit-toolbar/shortcut-dialogs can will show/manipulate the useractions too. The useractions are stored in ~/.kde/share/apps/krusader/useraction.xml (the file-structure is documentated in doxygen-headers of UserActionXML). Several examples of useraction.xml files can be found here. Useractions can be edit/add/im-/export using a new Konfigurator-module, although we plan to move all action-related to a new ActionMan. Once you understand howto write useractions you will find that Krusader is a very powerfull, customizable tool. Commands->User Menu or Ctrl+` opens the User Menu. The User Menu is only one place from where you can access Useractions. Useractions can appear nearly everywhere, not only in the User Menu. A menu entry Add new entry is available to add a new Useraction.
Managing Useractions
Open Konfigurator and choose "Useractions", here you can add/edit/remove/inport/export Useractions.
"Add Action": If you add an new action, you get an empty input-mask where you can enter all the properties. The action will be added as soon as you press "Ok". Now the name is shown in the list on the left.
To edit an Useraction: select the Useraction on the left. Now you can choose it if you want to edit the properties, the changes will only take effect when you press "Ok".
"Remove Action": Select the Useraction on the left and click the remove button.
"Inport Action": If you import some actions they will be automatically added to your list. If there are name-conflicts (the names have to be unique because these are the ID for KDE's action-system) you're asked to resolve them. For this the list on the left will only show the actions where conflicts exists. You now can give them new names or remove them.
"Export Action": If you export an useraction you have to give a file where to store it. If it does not exist it will be created. If it contains already some useractions, the action you're exporting will be added to that file.
Basic Properties
"Distinct Name", "Title" and "Command line" are always required, all the other properties are optional.
"Distinct Name": a unique name of the Useraction, used to identiy it for KDE's action-system.
"Icon button": the icon for you Useraction.
"Category": adds an category for an better overview. NOTE: this property is not used yet. It is planed to be used, but this is not implemented yet.
"Title": the title displayed in the menus/dialogs.
"Tooltip": a tooltip for your useraction, e.g. displayed in the toolbar on mouseover.
"Description": a description of what the Useraction is doing. This is also displayed as "What's This" if you Shift+F1 click on your Useraction.
"Use Tooltip checkbox": uses the tooltip as description.
"Command line": is the command which is finaly executed. You can add placeholder using a GUI with the "add" button.
"Startpath": the startpath of the command that will be executed.
"Execution mode":
"Normal": normal execution mode.
"Run in terminal": runs the command in the terminal.
"Collect output": collects the output off te executed programm in a GUI window.
"Separate standard error" when "Collect output" is used the stdout and stderr are separately collected
"Command accepts":
"Local files (no URL's)": tells the placeholder it should return local addesses.
"URL's (local and remote)": tells the placeholder it should return URL's.
"Shortcut button": configures a shortcut for the useraction.
Currently, these placeholder are implemented (for details see UserAction/expander.cpp or doxygen):
Path - replaced by the panels path
Count - replaced by the number of <first parameter>
Filter - replaced by the panels filter-mask
Current - replaced by the current item
List replaced by a list of all <first parameter>
Select - manipulates the selection in a panel
Goto - changes the panels's path to <first parameter>
Ask - asks the user for a some text and is replaced by the answer
Clipboard - manipulates the clipboard
Copy - copies a file, useful for quick, local, backups
Sync - opens the Synchronizer with a given profile
NewSearch - opens the search-windows with a given profile
Profile - loads a given panel-profile
Advanced Properties
Here you can configure where your command should be visible (for the rightclick-menu) In addition it's possible to change the command executed and confirm it separatly. You can also set a user under which the command should be executed.
Configures if the action is valid for a Protocol, Path, Mime-type or Filename.
Tweaking the commandline before beeing executed.
Prev | Home | Next |
KruSyncDir: Synchronize Directories | Up | Frequently Asked Questions (FAQ) |