init.lisp 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. ;; -*-lisp-*-
  2. ;;
  3. ;; Here is a sample .stumpwmrc file
  4. (in-package :stumpwm)
  5. ;; change the prefix key to something else
  6. (set-prefix-key (kbd "C-z"))
  7. ;; prompt the user for an interactive command. The first arg is an
  8. ;; optional initial contents.
  9. (defcommand colon1 (&optional (initial "")) (:rest)
  10. (let ((cmd (read-one-line (current-screen) ": " :initial-input initial)))
  11. (when cmd
  12. (eval-command cmd t))))
  13. ;; Read some doc
  14. (define-key *root-map* (kbd "d") "exec gv")
  15. ;; Browse somewhere
  16. (define-key *root-map* (kbd "b") "colon1 exec x-www-browser http://www.")
  17. ;; Ssh somewhere
  18. (define-key *root-map* (kbd "C-s") "colon1 exec x-terminal-emulator -e ssh ")
  19. ;; Lock screen
  20. (define-key *root-map* (kbd "C-l") "exec xlock")
  21. ;; Web jump (works for Google and Imdb)
  22. (defmacro make-web-jump (name prefix)
  23. `(defcommand ,(intern name) (search) ((:rest ,(concatenate 'string name " search: ")))
  24. (substitute #\+ #\Space search)
  25. (run-shell-command (concatenate 'string ,prefix search))))
  26. (make-web-jump "google" "x-www-browser http://www.google.fr/search?q=")
  27. (make-web-jump "imdb" "x-www-browser http://www.imdb.com/find?q=")
  28. ;; C-t M-s is a terrble binding, but you get the idea.
  29. (define-key *root-map* (kbd "M-s") "google")
  30. (define-key *root-map* (kbd "i") "imdb")
  31. ;; Message window font
  32. (set-font "-xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso8859-15")
  33. ;;; Define window placement policy...
  34. ;; Clear rules
  35. (clear-window-placement-rules)
  36. ;; Last rule to match takes precedence!
  37. ;; TIP: if the argument to :title or :role begins with an ellipsis, a substring
  38. ;; match is performed.
  39. ;; TIP: if the :create flag is set then a missing group will be created and
  40. ;; restored from *data-dir*/create file.
  41. ;; TIP: if the :restore flag is set then group dump is restored even for an
  42. ;; existing group using *data-dir*/restore file.
  43. (define-frame-preference "Default"
  44. ;; frame raise lock (lock AND raise == jumpto)
  45. (0 t nil :class "Konqueror" :role "...konqueror-mainwindow")
  46. (1 t nil :class "XTerm"))
  47. (define-frame-preference "Ardour"
  48. (0 t t :instance "ardour_editor" :type :normal)
  49. (0 t t :title "Ardour - Session Control")
  50. (0 nil nil :class "XTerm")
  51. (1 t nil :type :normal)
  52. (1 t t :instance "ardour_mixer")
  53. (2 t t :instance "jvmetro")
  54. (1 t t :instance "qjackctl")
  55. (3 t t :instance "qjackctl" :role "qjackctlMainForm"))
  56. (define-frame-preference "Shareland"
  57. (0 t nil :class "XTerm")
  58. (1 nil t :class "aMule"))
  59. (define-frame-preference "Emacs"
  60. (1 t t :restore "emacs-editing-dump" :title "...xdvi")
  61. (0 t t :create "emacs-dump" :class "Emacs"))