home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gwm18a.zip / data / drop-menus.gwm < prev    next >
Lisp/Scheme  |  1995-07-03  |  3KB  |  134 lines

  1. ; DECORATIONS FOR EPOCH
  2. ; =====================
  3.  
  4. ;;File: epoch.gwm -- window decorations for epoch
  5. ;;Heritage: simple-win.gwm
  6.  
  7. ;;Author: Brian L. Kahn   blk@security.mitre.org 
  8. ;;Copyright 1992, MITRE Corporation
  9. ;;Not for sale or resale, distribution unlimited
  10.  
  11.  
  12. ;; the Dmenu: function creates a named drop-down menu with N items
  13. ;; arguments are the GWM name, menu name string, and a list of items
  14. ;; each item has an item name string and a GWM or elisp command
  15. ;;  Dmenu.exec is an example of a GWM command
  16. ;;  elisp commands are in quotes, and are sent to the window
  17.  
  18.  
  19. (Dmenu: Dmenu.exec
  20.     '("exec" 
  21.       (("execute cut buffer" (execute-string (+ "(? " cut-buffer ")")))
  22.        )))
  23.  
  24.  
  25. (Dmenu: Dmenu.db
  26.    '("db" 
  27.      (("toggle debug" "(setq debug-on-error (not debug-on-error))")
  28.       ("debug on" "(setq debug-on-error t)")
  29.       ("debug off" "(setq debug-on-error f)")
  30.       )))
  31.  
  32. (Dmenu: Dmenu.files
  33.    '("files"
  34.      (("open files" "(buffer-menu-sized)")
  35.       ("directory" "(dired default-directory)")
  36.       ("elisp lib" "(dired (expand-file-name "~/lib/emacs"))")
  37.       )))
  38.  
  39. (Dmenu: Dmenu.buffers 
  40.    '("buffers"
  41.      (("other buffer" "(switch-to-buffer (other-buffer))")
  42.       ("*scratch* buffer" "(switch-to-buffer \"*scratch*\")")
  43.       ("-" (bell))
  44.       ("kill buffer" "(kill-buffer (current-buffer))")
  45.       )))
  46.  
  47. (Dmenu: Dmenu.windows 
  48.    '("windows"
  49.      (("one window" "(delete-other-windows)")
  50.       ("split screen" "(split-window-vertically)")
  51.       )))
  52.  
  53. (Dmenu: Dmenu.screens 
  54.    '("screens"
  55.      (("new screen" "(epoch:create-screen-offset 18)")
  56.       ("delete screen" "(delete-screen)")
  57.       ("name screen" "(epoch::icon-name (buffer-name))")
  58.       )))
  59.  
  60. (Dmenu: Dmenu.fonts
  61.    '("fonts"
  62.      (("screen-14" "(progn (font \"screen.r.14\") (redraw-display))")
  63.       ("screen-11" "(progn (font \"screen.r.11\") (redraw-display))")
  64.       ("screen-7" "(progn (font \"screen.r.7\") (redraw-display))")
  65.       ("serif-16" "(progn (font \"serif.r.16\") (redraw-display))")
  66.       ("misc-15" "(progn (font \"-misc*medium*-15-*\") (redraw-display))")
  67.       ("misc-15-bold" "(progn (font \"-misc*bold*-15-*\") (redraw-display))")
  68.       ("misc-20-bold" "(progn (font \"-misc*bold*-20-*\") (redraw-display))")
  69.       ("courier-20" "(progn (font \"-*-courier-medium-r-*-20-*\") (redraw-display))")
  70.       )))
  71.  
  72. (Dmenu: Dmenu.mail 
  73.    '("mail"
  74.      (("read mail" "(mh-rmail)")
  75.       ("send mail" "(mh-smail)")
  76.       )))
  77.  
  78. (Dmenu: Dmenu.info
  79.     '("info" (("info & help" "(info)"))))
  80.  
  81. (Dmenu: Dmenu.news
  82.     '("news" (("usenet news" "(gnus)"))))
  83.  
  84. (Dmenu: Dmenu.shell
  85.     '("shell" (("csh" "(progn (csh) (end-of-buffer))"))))
  86.  
  87. (Dmenu: Dmenu.space
  88.     '(" " 
  89.       (("redisplay" "(redraw-display)")
  90.        )))
  91.  
  92.  
  93.  
  94.  
  95. ;; a little box with the hostname in it
  96. (: Dmenu.HOST
  97.    '(with (background black foreground white fsm ())
  98.       (plug-make (label-make hostname widget.font))))
  99.  
  100. ;; an empty white box, for use as a separator
  101. (: Dmenu.BOX
  102.    '(with (background black foreground white fsm ())
  103.       (plug-make (label-make "  " widget.font))))
  104.  
  105.  
  106.  
  107.  
  108.  
  109. ;; A menu bar is made from a list of drop-down menus, like this:
  110. ;; (window-make (widget:Dmenubar-make Dmenu.epoch-menus) () () () () ))
  111.  
  112. (: Dmenu.epoch-menus
  113.    (list 
  114.     Dmenu.db
  115.     Dmenu.fonts
  116.     Dmenu.exec
  117.     Dmenu.space
  118.     Dmenu.files
  119.     Dmenu.buffers
  120.     Dmenu.windows
  121.     Dmenu.screens
  122.     Dmenu.space
  123.     Dmenu.mail
  124.     Dmenu.info
  125.     Dmenu.news
  126.     Dmenu.shell
  127.     Dmenu.db
  128.     ))
  129.      
  130.  
  131.  
  132.  
  133.  
  134.