Re: Run command
- From: "Charles \"core\" Stevenson" <corezion gmail com>
- To: sawfish-list gnome org
- Subject: Re: Run command
- Date: Mon, 10 Apr 2006 22:43:33 -0700
Hey Vlad.,
On 4/8/06, sawfish-list-request gnome org
<sawfish-list-request gnome org> wrote:
> 3. Run command (Vladimir Zolotykh)
...
> Could someone please give me a clue how to implement something
> like "Run Command" ?
I'm using the little bit that Jason sent out a week ago or so:
;; from sawfish mailing list by jason haslup <jason+sawfish haslup com>
(require 'sawfish.wm.util.prompt)
(defvar jh-exec-history (list)
"List of previously executed items.")
(defun jh-prompt-for-exec ()
(let ((e (prompt-from-list jh-exec-history "Execute: " nil t)))
(delete e jh-exec-history)
(when (and e (not (string= "" e)))
(setq jh-exec-history (append (list e) jh-exec-history))
(system (concat e "&")))))
;; added a command definition for gui access (core)
(define-command 'run-command jh-prompt-for-exec
#:doc "Prompts the user (graphically) for a command to run and provides
an execution history")
The last bit just added it to the GUI. Also Merlin has a library with
similar code that I've been thinking of integrating. It basically
implements a display-message where you can also set the fore- and
back-ground colors, font, etc..
http://merlin.org/sawfish/
peace,
core
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]