33 lines
632 B
Scheme
Executable File
33 lines
632 B
Scheme
Executable File
#!/bin/sh
|
|
|
|
../../scx <<EOF
|
|
|
|
,batch on
|
|
,open xlib
|
|
,batch off
|
|
|
|
(define (scxev)
|
|
(let* ((dpy (open-display))
|
|
(black (black-pixel dpy))
|
|
(white (white-pixel dpy))
|
|
(win (create-window (display-default-root-window dpy)
|
|
300 200
|
|
'event-mask '(all-events)
|
|
'background-pixel white))
|
|
)
|
|
(set-wm-name! win '("scx Event Listener"))
|
|
(map-window win)
|
|
(let event-loop ()
|
|
(display-flush-output dpy)
|
|
(let ((e (wait-event dpy)))
|
|
(display (event-type e)) (display " Event, Data:\n")
|
|
(display (event-args e)) (newline) (newline)
|
|
|
|
(event-loop))
|
|
(close-display dpy))))
|
|
|
|
(scxev)
|
|
|
|
,exit
|
|
y
|
|
EOF |