[ < ] [ > ]   [ << ] [Plus haut] [ >> ]         [Top] [Table des matières] [Index] [ ? ]

11. Commandes diverses

The following is a list of commands that don't really fit in any other section.

Command: emacs

Start emacs unless it is already running, in which case focus it.

Command: banish &OPTIONAL WHERE

NIL

Command: ratwarp X Y

Warp the mouse to the specified location.

Command: ratrelwarp DX DY

Warp the mouse by the specified amount from its current position.

Command: ratclick &OPTIONAL (BUTTON 1)

NIL

Command: echo-date

Display the date and time.

Command: eval-line CMD

NIL

Command: insert STRING

Send the string of characters to the current window as if they'd been typed.

Command: reload

Reload StumpWM using asdf.

Command: loadrc

Reload the ‘~/.stumpwmrc’ file.

Command: help

Display all the bindings in *root-map*.

Command: keyboard-quit
Command: quit

Quit StumpWM.

Command: soft-restart

Soft Restart StumpWM. The lisp process isn't restarted. Instead, control jumps to the very beginning of the stumpwm program. This differs from a theoretical hard restart, which would restart the unix process.

Command: getsel

Echo the X selection.

Command: putsel STRING

Stuff the string string into the X selection.

Command: command-mode

Command mode allows you to type ratpoison commands without needing the <C-t> prefix. Keys not bound in StumpWM will still get sent to the current window. To exit command mode, type <C-g>.

Command: copy-unhandled-error

When an unhandled error occurs, StumpWM restarts and attempts to continue. Unhandled errors should be reported to the mailing list so they can be fixed. Use this command to copy the unhandled error and backtrace to the X11 selection so you can paste in your email when submitting the bug report.

Command: commands

NIL

Command: lastmsg

NIL

Function: run-commands &REST COMMANDS

NIL

Macro: defcommand NAME (&REST ARGS) (&REST INTERACTIVE-ARGS) &BODY BODY

Create a command function and store its interactive hints in *command-hash*. The local variable %interactivep% can be used to check if the command was called interactively. If it is non-NIL then it was called from a keybinding or from the colon command.

Macro: define-stumpwm-type TYPE (INPUT PROMPT) &BODY BODY

Create a new type that can be used for command arguments. type can be any symbol.

When body is evaluated input is bound to the argument-line. It is passed to argument-pop, argument-pop-rest, etc. prompt is the prompt that should be used when prompting the user for the argument.

 
(define-stumpwm-type :symbol (input prompt)
 (or (find-symbol (string-upcase
		     (or (argument-pop input)
                         ;; Whitespace messes up find-symbol.
		         (string-trim " "
		           (completing-read (current-screen)
					  prompt
					  ;; find all symbols in the
					  ;;  stumpwm package.
					  (let (acc)
					    (do-symbols (s (find-package "STUMPWM"))
					      (push (string-downcase (symbol-name s)) acc))
					    acc)))
                      (throw 'error "Abort.")))
                  "STUMPWM")
     (throw 'error "Symbol not in STUMPWM package")))

(defcommand "symbol" (sym) ((:symbol "Pick a symbol: "))
  (message "~a" (with-output-to-string (s)
	          (describe sym s))))

This code creates a new type called :symbol which finds the symbol in the stumpwm package. The command symbol uses it and then describes the symbol.

Function: run-or-raise CMD PROPS &OPTIONAL (ALL-GROUPS *RUN-OR-RAISE-ALL-GROUPS*) (ALL-SCREENS *RUN-OR-RAISE-ALL-SCREENS*)

NIL

Variable: *run-or-raise-all-groups*

When this is T the run-or-raise function searches all groups for a running instance. Set it to NIL to search only the current group.

Variable: *run-or-raise-all-screens*

When this is T the run-or-raise function searches all screens for a running instance. Set it to NIL to search only the current screen. If *run-or-raise-all-groups* is NIL this variable has no effect.

Function: restarts-menu ERR

Display a menu with the active restarts and let the user pick one. Error is the error being recovered from. If the user aborts the menu, the error is re-signalled.

Macro: with-restarts-menu &BODY BODY

Execute BODY. If an error occurs allow the user to pick a restart from a menu of possible restarts. If a restart is not chosen, resignal the error.

Variable: *startup-message*

This is the message StumpWM displays when it starts. Set it to NIL to suppress.

Variable: *suppress-abort-messages*

Suppress abort message when non-nil.

Variable: *default-package*

This is the package eval reads and executes in. You might want to set this to :stumpwm if you find yourself using a lot of internal stumpwm symbols. Setting this variable anywhere but in your rc file will have no effect.

Macro: defprogram-shortcut NAME &KEY (COMMAND (STRING-DOWNCASE (STRING NAME))) (PROPS (BACKQ-LIST (QUOTE QUOTE) (BACKQ-LIST (QUOTE CLASS) (STRING-CAPITALIZE COMMAND)))) (MAP *TOP-MAP*) (KEY (KBD (CONCAT H- (SUBSEQ COMMAND 0 1))))

define a command and key binding to run or raise a program.


[ < ] [ > ]   [ << ] [Plus haut] [ >> ]         [Top] [Table des matières] [Index] [ ? ]

Ce document a été généré par Eric Reinbold le 9 Octobre 2008 en utilisant texi2html 1.78.