Jump to content

Plasma/PlasmaShellFeatures: Difference between revisions

From KDE Community Wiki
Notmart (talk | contribs)
Notmart (talk | contribs)
No edit summary
 
Line 1: Line 1:
This document outlines the features provided by Plasma 5's plasmashell "universal shell binary" tool.
This document outlines the features provided by Plasma 5's plasmashell "universal shell binary" tool.
==Shell Package==
The QML files and other configuration files that define the behavior of the plasma shell, are contained in a Package defined by the [[Plasma/shellPackage | Shell package structure]]


==Applet Alternatives==
==Applet Alternatives==

Latest revision as of 17:13, 2 September 2014

This document outlines the features provided by Plasma 5's plasmashell "universal shell binary" tool.

Shell Package

The QML files and other configuration files that define the behavior of the plasma shell, are contained in a Package defined by the Shell package structure

Applet Alternatives

The applet alternatives interface allows the user to select another functionally equivalent applet to replace a currently running one. An example might be a clock: the default might be a digital clock (sensible) but the user may wish to have an anolog or a fuzzy clock instead. Using the alternatives interface, the user can select one of these options and have it replace the digital clock currently active.

To enable this feature, containments must emit the Plasma::Containment::appletAlternativesRequested signal and the shell package must provide the contents/explorer/AppletAlternatives.qml file. The AppletAlternatives.qml file is responsible for the entire UI, including the top level dialog if that is appropriate.

The top level item in that QML file must provide the following property:

boolean visible, with visibleChanged(bool) changed signal which should follow the visibility of the user interface. When set to false it will be deleted by plasmashell

Desktop Scripting

Interactive Console

The interactive console is an optional user interface that allows the user to write and run desktop scripts within the current, live session. To provide a console, the shell package must provide the contents/InteractiveConsole.qml file. The top level item in that QML file must provide the following properties:

boolean visible, with visibleChanged(bool) changed signal which should follow the visibility of the user interface. When set to false it will be deleted by plasmashell string script: used to optionally set a path to a script on disk to load

It may also optionally provide the following property:

string property named mode for which the following values may be set by plasmashell: "desktop": the scripting is focused on the desktop and panels "windowmanager": the scripting is focused on the window manager

The shell sets a scriptEngine property in the global context which has the following interface:

  • function evaluateScript(string)
  • signal print(string)
  • signal printError(string)

Activities

Views

Containments

Configuration

Widget Explorer

On-Screen Display (OSD)

Shell Manager

DBus Interface