From 641803df358a2377e078c8c1ea05617bfe83bc1d Mon Sep 17 00:00:00 2001
From: Přemysl Eric Janouch <p@janouch.name>
Date: Thu, 31 Oct 2024 06:49:40 +0100
Subject: Enable user-defined actions

Also fix pclose() handling within Info plugins,
and prevent them from screwing up the terminal with error output
on initialization.

This is still rather crude, but at least it's possible.
---
 nncmpp.adoc | 12 ++++++++++++
 1 file changed, 12 insertions(+)

(limited to 'nncmpp.adoc')

diff --git a/nncmpp.adoc b/nncmpp.adoc
index 33e2834..eaebfc3 100644
--- a/nncmpp.adoc
+++ b/nncmpp.adoc
@@ -85,6 +85,18 @@ To adjust key bindings, put them within a *normal* or *editor* object.
 Run *nncmpp* with the *--debug* option to find out key combinations names.
 Press *?* in the help tab to learn the action identifiers to use.
 
+You may also define and bind your own actions, launching arbitrary
+shell commands.  Note that you cannot override internal actions in this manner.
+
+....
+actions = {
+  "pioneer-on-off" = {
+    description = "Pioneer amplifier: turn on/off"
+    command = "elksmart-comm --nec A538"
+  }
+}
+....
+
 Spectrum visualiser
 -------------------
 When built against the FFTW library, *nncmpp* can make use of MPD's "fifo"
-- 
cgit v1.2.3-70-g09d2

