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:
parent
de6fe0bf94
commit
a27f478645
|
@ -28,13 +28,24 @@
|
||||||
file may look like this:
|
file may look like this:
|
||||||
<pre>
|
<pre>
|
||||||
(define-structure config-file config-file-interface
|
(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
|
(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
|
(define root-options
|
||||||
'((quit . "F8")
|
`((quit . "F8")
|
||||||
(save-layout . "F7")
|
(save-layout . "F7")
|
||||||
(nth-workspace . ("M-1" "M-2" "M-3" "M-4" "M-5" "M-6" "M-7"))
|
(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 split-options '())
|
||||||
(define switch-options '())
|
(define switch-options '())
|
||||||
(define move-options '())))
|
(define move-options '())))
|
||||||
|
|
Loading…
Reference in New Issue