+ New command APPLY in the user bindings
+ Use & to start new processes and support program arguments in the EXEC command + Document APPLY, extend documentation of EXEC
This commit is contained in:
parent
d5f792b3d4
commit
d632a308bd
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
|
|
||||||
<h3>root-options</h3>
|
<h3>root-options</h3>
|
||||||
<table>
|
<table valign="top">
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>name</b></td>
|
<td><b>name</b></td>
|
||||||
<td><b>type</b></td>
|
<td><b>type</b></td>
|
||||||
|
@ -126,13 +126,23 @@
|
||||||
<td><code>user-bindings</code></td>
|
<td><code>user-bindings</code></td>
|
||||||
<td><code>binding-list</code></td>
|
<td><code>binding-list</code></td>
|
||||||
<td><code>'(("F2" exec "xterm"))</code></td>
|
<td><code>'(("F2" exec "xterm"))</code></td>
|
||||||
<td>List of user-defined key bindings.</td>
|
|
||||||
|
<td>List of user-defined key bindings. A binding consists of
|
||||||
|
the key to bind, a command and command arguments. Orion
|
||||||
|
currently supports the commands <code>exec</code> and
|
||||||
|
<code>apply</code>. The arguments of the <code>exec</code>
|
||||||
|
command should be the name of a program followed by
|
||||||
|
arguments to the program. Orion will execute this program
|
||||||
|
with the arguments. The <code>apply</code> command applies a
|
||||||
|
function, given as first command argument, to the arguments
|
||||||
|
starting at the second command argument.</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>execute</code></td>
|
<td><code>execute</code></td> <td><code>keys</code></td>
|
||||||
<td><code>keys</code></td>
|
<td><code>"F3"</code></td> <td>Shortcut for running a
|
||||||
<td><code>"F3"</code></td>
|
program. A dialog will ask for the program to run. The TAB
|
||||||
<td>Shortcut for running a program.</td>
|
key allows completion of the program name.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>execute-question</code></td>
|
<td><code>execute-question</code></td>
|
||||||
|
|
|
@ -196,7 +196,7 @@
|
||||||
;; *** main package **************************************************
|
;; *** main package **************************************************
|
||||||
|
|
||||||
(define-structure scsh-things
|
(define-structure scsh-things
|
||||||
(export ((run) :syntax))
|
(export ((run &) :syntax))
|
||||||
(open scsh))
|
(open scsh))
|
||||||
|
|
||||||
(define-structure config
|
(define-structure config
|
||||||
|
|
|
@ -319,7 +319,7 @@
|
||||||
#f (finite-complete (executables-in-path)))))
|
#f (finite-complete (executables-in-path)))))
|
||||||
(and exec
|
(and exec
|
||||||
(not (string=? exec ""))
|
(not (string=? exec ""))
|
||||||
(run (sh -c ,(string-append exec " &"))))))
|
(& (exec)))))
|
||||||
((attach)
|
((attach)
|
||||||
(let* ((cm (root-wm:current-manager root-wm))
|
(let* ((cm (root-wm:current-manager root-wm))
|
||||||
(windows-above (window-path (wm:dpy cm) (wm:window cm)))
|
(windows-above (window-path (wm:dpy cm) (wm:window cm)))
|
||||||
|
@ -363,7 +363,8 @@
|
||||||
(time (second msg))
|
(time (second msg))
|
||||||
(command (cdr binding)))
|
(command (cdr binding)))
|
||||||
(case (car command)
|
(case (car command)
|
||||||
((exec) (run (sh -c ,(string-append (cadr command) " &"))))
|
((exec) (& (,@(cdr command))))
|
||||||
|
((apply) (apply (cadr command) (cddr command)))
|
||||||
(else (warn "unknown binding command" command))))
|
(else (warn "unknown binding command" command))))
|
||||||
(warn "unhandled root message" msg)))))
|
(warn "unhandled root message" msg)))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue