Inhaltsverzeichnis

button_exec plugin

This plugin starts an external program and does not wait for it. It is meant to be used with the keypad widget, to run a command once when a key is pressed.

The difference to the exec plugin: exec runs a command periodically and returns its output, button_exec runs the command exactly once per call and returns immediately.


Functions

button_exec(command, arg1, arg2, …)start command with the given arguments

Example

Widget StopPlayer {
    class 'Keypad'
    position 'confirm'
    state 'pressed'
    expression button_exec('/usr/bin/mpc', 'stop')
}

Layout Default {
    Keypad1 'StopPlayer'
}

Requirements

No external libraries. The plugin is selected at build time with –with-plugins=button_exec (it is part of 'all').