| Scripts quick access edit this |
Synopsis
Prompt extensions.
Description
The main thing this provides is prext-menu which can be used to access a menu via the prompt system -- for folks who can't stand using the mouse but occasionally find menus useful. There's also prext-cmd which will run a shell command and display its output.
NOTE: Prext is not compatible with the latest sawfish from the git repository, or with future releases. For that you want Prompt-menu.
Installation
Put the file in your lisp directory and:
(require 'prext)
Configuration
Use this however you'd like. You could bind the root menu to a key:
(bind-keys global-keymap "H-r" '(prext-menu root-menu "Menu: "))
I have something similar to this in my .sawfishrc:
(defun ssh (user host #!optional title)
(system (concat
"xterm "
(and title (concat "-title '" title"' "))
"-e ssh " user "@" host " &")))
(defvar ssh-menu
'(("host1" (ssh "username" "host1.example.org" "Host #1"))
("host2" (ssh "username" "host2.example.org" "Host #2"))))
(define-command 'ssh (lambda () (prext-menu ssh-menu "ssh: ")))
(bind-keys global-keymap "H-s" 'ssh)
Then when I hit hyper-s I'm given an "ssh: " prompt which I can use to open up an ssh to a system in ssh-menu.