Documentation update
[clfswm.git] / src / menu-def.lisp
blob57cd8337fc68bd00b40dfe558b2608c91f07722d
1 ;;; --------------------------------------------------------------------------
2 ;;; CLFSWM - FullScreen Window Manager
3 ;;;
4 ;;; --------------------------------------------------------------------------
5 ;;; Documentation: Menu definitions
6 ;;;
7 ;;; Note: Mod-1 is the Alt or Meta key, Mod-2 is the Numlock key.
8 ;;; --------------------------------------------------------------------------
9 ;;;
10 ;;; (C) 2010 Philippe Brochard <hocwp@free.fr>
11 ;;;
12 ;;; This program is free software; you can redistribute it and/or modify
13 ;;; it under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or
15 ;;; (at your option) any later version.
16 ;;;
17 ;;; This program is distributed in the hope that it will be useful,
18 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
21 ;;;
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with this program; if not, write to the Free Software
24 ;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 ;;;
26 ;;; --------------------------------------------------------------------------
28 (in-package :clfswm)
30 (init-menu)
32 ;;; Here is a small example of menu manipulation:
34 ;;(add-menu-key 'main "a" 'help-on-second-mode)
35 ;;(add-menu-key 'main "c" 'help-on-clfswm)
37 ;;(add-sub-menu 'main "p" 'plop "A sub menu")
39 ;;(add-menu-key 'plop "a" 'help-on-clfswm)
40 ;;(add-menu-key 'plop "b" 'help-on-second-mode)
41 ;;(add-menu-key 'plop "d" 'help-on-second-mode)
44 ;;(del-menu-key 'main "p")
45 ;;(del-menu-value 'plop 'help-on-main-mode)
46 ;;(del-sub-menu 'main 'plop)
48 ;;(define-second-key ("a") 'open-menu)
50 (add-sub-menu 'main "F1" 'help-menu "Help menu")
51 (add-sub-menu 'main "d" 'standard-menu "Standard menu")
52 (add-sub-menu 'main "c" 'child-menu "Child menu")
53 (add-sub-menu 'main "f" 'frame-menu "Frame menu")
54 (add-sub-menu 'main "w" 'window-menu "Window menu")
55 (add-sub-menu 'main "s" 'selection-menu "Selection menu")
56 (add-sub-menu 'main "n" 'action-by-name-menu "Action by name menu")
57 (add-sub-menu 'main "u" 'action-by-number-menu "Action by number menu")
58 (add-sub-menu 'main "y" 'utility-menu "Utility menu")
59 (add-sub-menu 'main "o" 'configuration-menu "Configuration menu")
60 (add-sub-menu 'main "m" 'clfswm-menu "CLFSWM menu")
63 (update-menus (find-menu 'standard-menu))
65 (create-configuration-menu)
67 (add-menu-key 'help-menu "a" 'show-first-aid-kit)
68 (add-menu-key 'help-menu "h" 'show-global-key-binding)
69 (add-menu-key 'help-menu "b" 'show-main-mode-key-binding)
70 (add-menu-key 'help-menu "s" 'show-second-mode-key-binding)
71 (add-menu-key 'help-menu "r" 'show-circulate-mode-key-binding)
72 (add-menu-key 'help-menu "e" 'show-expose-window-mode-key-binding)
73 (add-menu-key 'help-menu "c" 'show-corner-help)
74 (add-menu-key 'help-menu "g" 'show-config-variable)
75 (add-menu-key 'help-menu "d" 'show-date)
76 (add-menu-key 'help-menu "p" 'show-cpu-proc)
77 (add-menu-key 'help-menu "m" 'show-mem-proc)
78 (add-menu-key 'help-menu "v" 'show-version)
81 (add-menu-key 'child-menu "r" 'rename-current-child)
82 (add-menu-key 'child-menu "e" 'ensure-unique-name)
83 (add-menu-key 'child-menu "n" 'ensure-unique-number)
84 (add-menu-key 'child-menu "Delete" 'delete-current-child)
85 (add-menu-key 'child-menu "X" 'remove-current-child)
86 (add-menu-key 'child-menu "h" 'hide-current-child)
87 (add-menu-key 'child-menu "u" 'unhide-a-child)
88 (add-menu-key 'child-menu "f" 'unhide-a-child-from-all-frames)
89 (add-menu-key 'child-menu "a" 'unhide-all-children)
90 (add-menu-key 'child-menu "Page_Up" 'frame-lower-child)
91 (add-menu-key 'child-menu "Page_Down" 'frame-raise-child)
95 (add-sub-menu 'frame-menu "a" 'frame-adding-menu "Adding frame menu")
96 (add-sub-menu 'frame-menu "l" 'frame-layout-menu "Frame layout menu")
97 (add-sub-menu 'frame-menu "n" 'frame-nw-hook-menu "Frame new window hook menu")
98 (add-sub-menu 'frame-menu "m" 'frame-movement-menu "Frame movement menu")
99 (add-sub-menu 'frame-menu "f" 'frame-focus-policy "Frame focus policy menu")
100 (add-sub-menu 'frame-menu "w" 'frame-managed-window-menu "Managed window type menu")
101 (add-sub-menu 'frame-menu "u" 'frame-unmanaged-window-menu "Unmanaged window behaviour")
102 (add-sub-menu 'frame-menu "s" 'frame-miscellaneous-menu "Frame miscallenous menu")
103 (add-menu-key 'frame-menu "x" 'frame-toggle-maximize)
106 (add-menu-key 'frame-adding-menu "a" 'add-default-frame)
107 (add-menu-key 'frame-adding-menu "p" 'add-placed-frame)
110 (add-sub-menu 'frame-movement-menu "p" 'frame-pack-menu "Frame pack menu")
111 (add-sub-menu 'frame-movement-menu "f" 'frame-fill-menu "Frame fill menu")
112 (add-sub-menu 'frame-movement-menu "r" 'frame-resize-menu "Frame resize menu")
113 (add-menu-key 'frame-movement-menu "c" 'center-current-frame)
114 (add-menu-key 'frame-movement-menu "Right" 'with-movement-select-next-brother)
115 (add-menu-key 'frame-movement-menu "Left" 'with-movement-select-previous-brother)
116 (add-menu-key 'frame-movement-menu "Up" 'with-movement-select-next-level)
117 (add-menu-key 'frame-movement-menu "Down" 'with-movement-select-previous-level)
118 (add-menu-key 'frame-movement-menu "Tab" 'with-movement-select-next-child)
121 (add-menu-key 'frame-pack-menu "Up" 'current-frame-pack-up)
122 (add-menu-key 'frame-pack-menu "Down" 'current-frame-pack-down)
123 (add-menu-key 'frame-pack-menu "Left" 'current-frame-pack-left)
124 (add-menu-key 'frame-pack-menu "Right" 'current-frame-pack-right)
127 (add-menu-key 'frame-fill-menu "Up" 'current-frame-fill-up)
128 (add-menu-key 'frame-fill-menu "Down" 'current-frame-fill-down)
129 (add-menu-key 'frame-fill-menu "Left" 'current-frame-fill-left)
130 (add-menu-key 'frame-fill-menu "Right" 'current-frame-fill-right)
131 (add-menu-key 'frame-fill-menu #\a 'current-frame-fill-all-dir)
132 (add-menu-key 'frame-fill-menu #\v 'current-frame-fill-vertical)
133 (add-menu-key 'frame-fill-menu #\h 'current-frame-fill-horizontal)
135 (add-menu-key 'frame-resize-menu "Up" 'current-frame-resize-up)
136 (add-menu-key 'frame-resize-menu "Down" 'current-frame-resize-down)
137 (add-menu-key 'frame-resize-menu "Left" 'current-frame-resize-left)
138 (add-menu-key 'frame-resize-menu "Right" 'current-frame-resize-right)
139 (add-menu-key 'frame-resize-menu #\d 'current-frame-resize-all-dir)
140 (add-menu-key 'frame-resize-menu #\a 'current-frame-resize-all-dir-minimal)
143 (add-menu-comment 'frame-focus-policy "-=- For the current frame -=-")
144 (add-menu-key 'frame-focus-policy "a" 'current-frame-set-click-focus-policy)
145 (add-menu-key 'frame-focus-policy "b" 'current-frame-set-sloppy-focus-policy)
146 (add-menu-key 'frame-focus-policy "c" 'current-frame-set-sloppy-strict-focus-policy)
147 (add-menu-key 'frame-focus-policy "d" 'current-frame-set-sloppy-select-policy)
148 (add-menu-comment 'frame-focus-policy "-=- For all frames -=-")
149 (add-menu-key 'frame-focus-policy "e" 'all-frames-set-click-focus-policy)
150 (add-menu-key 'frame-focus-policy "f" 'all-frames-set-sloppy-focus-policy)
151 (add-menu-key 'frame-focus-policy "g" 'all-frames-set-sloppy-strict-focus-policy)
152 (add-menu-key 'frame-focus-policy "h" 'all-frames-set-sloppy-select-policy)
157 (add-menu-key 'frame-managed-window-menu "m" 'current-frame-manage-window-type)
158 (add-menu-key 'frame-managed-window-menu "a" 'current-frame-manage-all-window-type)
159 (add-menu-key 'frame-managed-window-menu "n" 'current-frame-manage-only-normal-window-type)
160 (add-menu-key 'frame-managed-window-menu "u" 'current-frame-manage-no-window-type)
162 (add-menu-key 'frame-unmanaged-window-menu "s" 'set-show-unmanaged-window)
163 (add-menu-key 'frame-unmanaged-window-menu "h" 'set-hide-unmanaged-window)
164 (add-menu-key 'frame-unmanaged-window-menu "d" 'set-default-hide-unmanaged-window)
165 (add-menu-key 'frame-unmanaged-window-menu "w" 'set-globally-show-unmanaged-window)
166 (add-menu-key 'frame-unmanaged-window-menu "i" 'set-globally-hide-unmanaged-window)
169 (add-menu-key 'frame-miscellaneous-menu "s" 'show-all-frames-info)
170 (add-menu-key 'frame-miscellaneous-menu "i" 'hide-all-frames-info)
171 (add-menu-key 'frame-miscellaneous-menu "h" 'hide-current-frame-window)
172 (add-menu-key 'frame-miscellaneous-menu "w" 'show-current-frame-window)
173 (add-menu-key 'frame-miscellaneous-menu "u" 'renumber-current-frame)
174 (add-menu-key 'frame-miscellaneous-menu "x" 'explode-current-frame)
179 (add-menu-key 'window-menu "i" 'display-current-window-info)
180 (add-menu-key 'window-menu "f" 'force-window-in-frame)
181 (add-menu-key 'window-menu "c" 'force-window-center-in-frame)
182 (add-menu-key 'window-menu "m" 'manage-current-window)
183 (add-menu-key 'window-menu "u" 'unmanage-current-window)
184 (add-menu-key 'window-menu "a" 'adapt-current-frame-to-window-hints)
185 (add-menu-key 'window-menu "w" 'adapt-current-frame-to-window-width-hint)
186 (add-menu-key 'window-menu "h" 'adapt-current-frame-to-window-height-hint)
190 (add-menu-key 'selection-menu "x" 'cut-current-child)
191 (add-menu-key 'selection-menu "c" 'copy-current-child)
192 (add-menu-key 'selection-menu "v" 'paste-selection)
193 (add-menu-key 'selection-menu "p" 'paste-selection-no-clear)
194 (add-menu-key 'selection-menu "Delete" 'remove-current-child)
195 (add-menu-key 'selection-menu "z" 'clear-selection)
199 (add-menu-key 'action-by-name-menu "f" 'focus-frame-by-name)
200 (add-menu-key 'action-by-name-menu "o" 'open-frame-by-name)
201 (add-menu-key 'action-by-name-menu "d" 'delete-frame-by-name)
202 (add-menu-key 'action-by-name-menu "m" 'move-current-child-by-name)
203 (add-menu-key 'action-by-name-menu "c" 'copy-current-child-by-name)
205 (add-menu-key 'action-by-number-menu "f" 'focus-frame-by-number)
206 (add-menu-key 'action-by-number-menu "o" 'open-frame-by-number)
207 (add-menu-key 'action-by-number-menu "d" 'delete-frame-by-number)
208 (add-menu-key 'action-by-number-menu "m" 'move-current-child-by-number)
209 (add-menu-key 'action-by-number-menu "c" 'copy-current-child-by-number)
212 (add-menu-key 'utility-menu "i" 'identify-key)
213 (add-menu-key 'utility-menu "colon" 'eval-from-query-string)
214 (add-menu-key 'utility-menu "exclam" 'run-program-from-query-string)
215 (add-sub-menu 'utility-menu "o" 'other-window-manager-menu "Other window manager menu")
217 (add-menu-key 'other-window-manager-menu "x" 'run-xterm)
218 (add-menu-key 'other-window-manager-menu "t" 'run-twm)
219 (add-menu-key 'other-window-manager-menu "i" 'run-icewm)
220 (add-menu-key 'other-window-manager-menu "g" 'run-gnome-session)
221 (add-menu-key 'other-window-manager-menu "k" 'run-startkde)
222 (add-menu-key 'other-window-manager-menu "c" 'run-xfce4-session)
223 (add-menu-key 'other-window-manager-menu "l" 'run-lxde)
224 (add-menu-key 'other-window-manager-menu "p" 'run-prompt-wm)
227 (add-menu-key 'clfswm-menu "r" 'reset-clfswm)
228 (add-menu-key 'clfswm-menu "l" 'reload-clfswm)
229 (add-menu-key 'clfswm-menu "x" 'exit-clfswm)