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.
| button_exec(command, arg1, arg2, …) | start command with the given arguments |
Widget StopPlayer {
class 'Keypad'
position 'confirm'
state 'pressed'
expression button_exec('/usr/bin/mpc', 'stop')
}
Layout Default {
Keypad1 'StopPlayer'
}
No external libraries. The plugin is selected at build time with –with-plugins=button_exec (it is part of 'all').