Example config file that uses APPLY to call a scheme function that

starts opera with the contents of the X selection.
This commit is contained in:
mainzelm 2003-12-04 12:55:31 +00:00
parent de6fe0bf94
commit a27f478645
1 changed files with 14 additions and 3 deletions

View File

@ -28,13 +28,24 @@
file may look like this:
<pre>
(define-structure config-file config-file-interface
(open scheme xlib config-file-utils)
(open (modify scheme-with-scsh (hide format))
srfi-28
xlib
config-file-utils)
(begin
(define (xsel->opera-remote)
(let* ((url (run/string (xsel)))
(remote-arg (format "openURL(~a,new-window)" url)))
(& (opera -remote ,remote-arg))))
(define root-options
'((quit . "F8")
`((quit . "F8")
(save-layout . "F7")
(nth-workspace . ("M-1" "M-2" "M-3" "M-4" "M-5" "M-6" "M-7"))
(create-workspace . "F5")))
(create-workspace . "F5")
(user-bindings . (("F2" exec "xterm")
("F4" apply ,xsel->opera-remote)))))
(define split-options '())
(define switch-options '())
(define move-options '())))