773pages on
this wiki
Add New Page
Talk0 Share
Scripts quick access edit this

Synopsis Edit

Access menus via a prompt with tab completion.

Description Edit

This provides the prompt-menu function which gives you access to a menu via the prompt system. This gives you a sort of hierarchical command-line interface to sawfish commands.

NOTE: this supersedes the old prext script. For now, this version only works with a sawfish compiled from the git repository. If you want to use it with an older sawfish try Prext.

Installation Edit

Put the file in your lisp directory and:

(require 'prompt-menu)

Configuration Edit

Use this however you'd like. You could bind the root menu to a key:

(bind-keys global-keymap "H-r" '(prompt-menu root-menu "Menu: "))

But you can do more interesting things too. For example, I have something like 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" "" "Host #1"))
    ("host2" (ssh "username" "" "Host #2"))))

(define-command 'ssh (lambda () (prompt-menu ssh-menu "ssh: ")))

(bind-keys global-keymap "H-s" 'ssh)

Then when I hit hyper-s I'm given an "ssh: " prompt which tab completes on a list of hostnames, and I can use it to open up an ssh to that host.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.