CLI Output Applet Configuration

Since plainDE 0.6 release there is CLI Output applet. It lets you show output of a command or data depending on output of a command on the panel.

Note. plainControlCenter 0.6.1 and upper fully supports CLI Output Applet.

How to set it up?

CLI Output applet can be configured both using plainControlCenter and manually. All configs of CLI Output applets are stored in ~/.config/plainDE/clioutput-applets/ and have JSON format.

Property description

Name of property Type of value Acceptable value Description
type String "stdout" / "condition" / "data" Sets type of CLI Output applet. stdout - just show output of command. condition - compare command output or exit code with preset conditions and show required data. data - use stdout as Output Data (IconNameOrPath;Text)
command String Shell command. Note. Pipes are not supported. Put them in separate script if needed. Sets shell command that will be executed to get data.
interval Int milliseconds value Delay between each update.
conditionType String stdout / exitcode Criteria that will be used to find matching output data. Note Works only if condition mode is used.
conditions JsonObject Match pair: Criteria -> Output Data Sets matching pairs that will be used to find suitable output data. Note Works only if condition mode is used.
elseCondition String Output Data Sets output data that will be shown if no suitable option was found in previous option.
waitData String IconNameOrPath;Text Data that will be set to QLabel while command is running. Note Works only if condition mode is used.

Config sample

~/.config/plainDE/clioutput-applets/checkupdates.json

{
	"type": "condition",
	"command": "checkupdates",
	"interval": 3600000,
	"conditionType": "exitcode",
	"conditions": {
		"0": "help-info;Updates available",
		"2": "mail-mark-notjunk;No updates"
	},
	"elseCondition": "gtk-cancel;Failed",
	"waitData": "mail-send-receive;Fetching info"
}

P.S. This a real config that checks updates every 1 hour. It works on Arch Linux with installed pacman-contrib package.

Add clioutput:[appletname] in applets property of your panel in order to enable this applet. [appletname] is name of a file from ~/.config/plainDE/clioutput-applets/ without .json in the end.

Example:

'panel1': {
	'applets': [..., 'clioutput:checkupdates'],
	...
}