From d632a308bda54f71c2e2d9b6fe59aacecf81e7c7 Mon Sep 17 00:00:00 2001 From: mainzelm Date: Tue, 18 Nov 2003 13:06:04 +0000 Subject: [PATCH] + 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 --- doc/user.html | 22 ++++++++++++++++------ src/packages.scm | 2 +- src/root-manager.scm | 5 +++-- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/doc/user.html b/doc/user.html index 1aea1d2..b24d628 100644 --- a/doc/user.html +++ b/doc/user.html @@ -46,7 +46,7 @@

root-options

- +
@@ -126,13 +126,23 @@ - + + + - - - - + + diff --git a/src/packages.scm b/src/packages.scm index de8e27e..54e791e 100644 --- a/src/packages.scm +++ b/src/packages.scm @@ -196,7 +196,7 @@ ;; *** main package ************************************************** (define-structure scsh-things - (export ((run) :syntax)) + (export ((run &) :syntax)) (open scsh)) (define-structure config diff --git a/src/root-manager.scm b/src/root-manager.scm index 42bf095..8b8664b 100644 --- a/src/root-manager.scm +++ b/src/root-manager.scm @@ -319,7 +319,7 @@ #f (finite-complete (executables-in-path))))) (and exec (not (string=? exec "")) - (run (sh -c ,(string-append exec " &")))))) + (& (exec))))) ((attach) (let* ((cm (root-wm:current-manager root-wm)) (windows-above (window-path (wm:dpy cm) (wm:window cm))) @@ -363,7 +363,8 @@ (time (second msg)) (command (cdr binding))) (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)))) (warn "unhandled root message" msg)))))
name typeuser-bindings binding-list '(("F2" exec "xterm"))List of user-defined key bindings.List of user-defined key bindings. A binding consists of + the key to bind, a command and command arguments. Orion + currently supports the commands exec and + apply. The arguments of the exec + command should be the name of a program followed by + arguments to the program. Orion will execute this program + with the arguments. The apply command applies a + function, given as first command argument, to the arguments + starting at the second command argument.
executekeys"F3"Shortcut for running a program.execute keys"F3" Shortcut for running a + program. A dialog will ask for the program to run. The TAB + key allows completion of the program name.
execute-question