add river-control-unstable-v1 support
This commit is contained in:
@@ -23,22 +23,60 @@ If certain handlers are installed it will run continously.
|
||||
.P
|
||||
Uppon launch, riverguile tries to load the script from the following paths
|
||||
in the given order:
|
||||
.IP \(bu 2
|
||||
.IP \(bu 2
|
||||
\fBlayout.scm\fR
|
||||
.IP \(bu 2
|
||||
.IP \(bu 2
|
||||
\fB$XDG_CONFIG_HOME/river/layout.scm\fR
|
||||
.IP \(bu 2
|
||||
.IP \(bu 2
|
||||
\fB$HOME/.config/river/layout.scm\fR
|
||||
.IP \(bu 2
|
||||
.IP \(bu 2
|
||||
\fB/etc/riverguile/layout.scm\fR
|
||||
.
|
||||
.
|
||||
.SH COMMANDS
|
||||
.P
|
||||
Riverguile exposes the special procedure
|
||||
\fB(riverctl \fR\fIfirst\fR . \fIrest\fR\fB)\fR, which can be used to send
|
||||
commands to the server in a similar fashion to
|
||||
.BR riverctl (1).
|
||||
All arguments must be strings.
|
||||
.P
|
||||
Here is an example of using this procedure to instruct river to spawn an
|
||||
instance of the
|
||||
.BR foot (1)
|
||||
terminal emulator:
|
||||
.P
|
||||
.RS
|
||||
.EX
|
||||
(\fBriverctl\fR "spawn" "foot")
|
||||
.EE
|
||||
.RE
|
||||
.P
|
||||
To make using this procedure more ergonomic you likely want to wrap it in a
|
||||
macro like this:
|
||||
.P
|
||||
.RS
|
||||
.EX
|
||||
(\fBdefine-syntax\fR R
|
||||
(\fBsyntax-rules\fR ()
|
||||
((R first) (riverctl (\fBsymbol->string\fR 'first)))
|
||||
((R first . rest) (\fBapply\fR riverctl
|
||||
(\fBmap\fR \fBsymbol->string\fR
|
||||
(\fBappend\fR '(first) 'rest))))))
|
||||
|
||||
(R spawn foot)
|
||||
(R spawn \fB#{\fRnotify-send notification!\fB}#\fR)
|
||||
.EE
|
||||
.RE
|
||||
.P
|
||||
This macro can of course be further modified to suit your specific needs.
|
||||
.
|
||||
.
|
||||
.SH EVENT HANDLERS
|
||||
.P
|
||||
In the context of the script, a special procedure
|
||||
\fB(install-handler \fR\fIkey\fR \fIproc\fR\fB)\fR is available, which can be
|
||||
used to install event handlers.
|
||||
Riverguile exposes the special procedure
|
||||
\fB(install-handler \fR\fIkey\fR \fIproc\fR\fB)\fR, which can be used to install
|
||||
event handlers.
|
||||
The parameter \fIkey\fR is a symbol indicating for which event to install
|
||||
the procedure \fIproc\fR.
|
||||
The following keys are currently evailable:
|
||||
|
||||
Reference in New Issue
Block a user