load script after initial registry burst
This makes the logic of installing idle handlers and layout handlers a bit cleaner and allows us to send wayland request from the script in the future.
This commit is contained in:
16
README.md
16
README.md
@@ -1,8 +1,10 @@
|
||||
# riverguile
|
||||
|
||||
Layout generator for the [river](https://github.com/riverwm/river) Wayland
|
||||
server which uses [Guile Scheme](https://www.gnu.org/software/guile/) for
|
||||
layouts. Its layout namespace is `riverguile`.
|
||||
Scripting layer for the [river](https://github.com/riverwm/river) Wayland
|
||||
server using [Guile Scheme](https://www.gnu.org/software/guile/).
|
||||
|
||||
Send commands to river and install handlers for various events, inclusing
|
||||
layout events.
|
||||
|
||||
Uppon launch, riverguile tries to load a scheme script and checks the following
|
||||
paths for it in the given order:
|
||||
@@ -17,9 +19,15 @@ is available, which can be used to install handlers to certain events.
|
||||
Check the man page for more information.
|
||||
|
||||
Here is an example `layout.scm` file replicating rivertiles behavior of having
|
||||
a main window and a stack of windows aside:
|
||||
a main window and a stack of windows aside while also automatically locking
|
||||
the screen after five minutes of inactivity.
|
||||
|
||||
```scheme
|
||||
(install-handler 'idle:300 (lambda (event)
|
||||
(cond ((eq? event 'idle) (system "swaylock &")
|
||||
(system "backlight.sh set-to 40"))
|
||||
((eq? event 'resume) (system "backlight.sh set-to 100")))))
|
||||
|
||||
(define split 0.55)
|
||||
|
||||
(define (layout:rows n x y w h)
|
||||
|
||||
Reference in New Issue
Block a user