load argv[1] as script and remove default paths

This commit is contained in:
Leon Henrik Plickat
2024-01-08 13:04:12 +01:00
parent 4ae3654e35
commit b31a4f91a2
2 changed files with 61 additions and 61 deletions

View File

@@ -7,6 +7,7 @@ riverguile \- scheme powered scripting layer for river
.
.SH SYNOPSIS
.SY riverguile
path-to-script
.YS
.
.
@@ -17,20 +18,29 @@ Scripting layer for the
Wayland server.
Allows the user to send commands to the Wayland server (probably river) and
install handlers for events from a scheme script.
The sheme implementation is provided by
.BR guile (1).
.P
By default, riverguile will exit after the script has been loaded and evaluated.
If certain handlers are installed it will run continously.
The canonical way to use riverguile is as an interpreter for the river init
script.
To do so place the following expression at the very top of your init script:
.P
Uppon launch, riverguile tries to load the script from the following paths
in the given order:
.IP \(bu 2
\fBlayout.scm\fR
.IP \(bu 2
\fB$XDG_CONFIG_HOME/river/layout.scm\fR
.IP \(bu 2
\fB$HOME/.config/river/layout.scm\fR
.IP \(bu 2
\fB/etc/riverguile/layout.scm\fR
.RS
.EX
#!/bin/env riverguile
!#
.EE
.RE
.P
Do not leave out the second line, as the octothorpe plus exlamation-mark
combination indicates a multi-line comment in scheme.
Do not forget to mark your init script as executable.
Your custom scheme code to configure the river session may follow after these
two lines.
.P
By default, riverguile will exit after the script has been loaded.
However if certain handlers are installed it will run continously to provide
that functionality.
.
.
.SH COMMANDS