1 ;;; --------------------------------------------------------------------------
2 ;;; CLFSWM - FullScreen Window Manager
4 ;;; --------------------------------------------------------------------------
5 ;;; Documentation: Menu definitions
7 ;;; Note: Mod-1 is the Alt or Meta key, Mod-2 is the Numlock key.
8 ;;; --------------------------------------------------------------------------
10 ;;; (C) 2005-2015 Philippe Brochard <pbrochard@common-lisp.net>
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.
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.
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.
26 ;;; --------------------------------------------------------------------------
30 (format t
"Updating menus...")
35 ;;; Here is a small example of menu manipulation:
37 ;;(add-menu-key 'main "a" 'help-on-second-mode)
38 ;;(add-menu-key 'main "c" 'help-on-clfswm)
40 ;;(add-sub-menu 'main "p" 'plop "A sub menu")
42 ;;(add-menu-key 'plop "a" 'help-on-clfswm)
43 ;;(add-menu-key 'plop "b" 'help-on-second-mode)
44 ;;(add-menu-key 'plop "d" 'help-on-second-mode)
47 ;;(del-menu-key 'main "p")
48 ;;(del-menu-value 'plop 'help-on-main-mode)
49 ;;(del-sub-menu 'main 'plop)
51 ;;(define-second-key ("a") 'open-menu)
53 (add-sub-menu 'main
"F1" 'help-menu
"Help menu")
54 (add-sub-menu 'main
"d" 'standard-menu
"Standard menu")
55 (add-sub-menu 'main
"c" 'child-menu
"Child menu")
56 (add-sub-menu 'main
"r" 'root-menu
"Root menu")
57 (add-sub-menu 'main
"f" 'frame-menu
"Frame menu")
58 (add-sub-menu 'main
"w" 'window-menu
"Window menu")
59 (add-sub-menu 'main
"s" 'selection-menu
"Selection menu")
60 (add-sub-menu 'main
"n" 'action-by-name-menu
"Action by name menu")
61 (add-sub-menu 'main
"u" 'action-by-number-menu
"Action by number menu")
62 (add-sub-menu 'main
"y" 'utility-menu
"Utility menu")
63 (add-sub-menu 'main
"o" 'configuration-menu
"Configuration menu")
64 (add-sub-menu 'main
"m" 'clfswm-menu
"CLFSWM menu")
67 (update-menus (find-menu 'standard-menu
))
69 (add-menu-key 'help-menu
"a" 'show-first-aid-kit
)
70 (add-menu-key 'help-menu
"h" 'show-global-key-binding
)
71 (add-menu-key 'help-menu
"b" 'show-main-mode-key-binding
)
72 (add-menu-key 'help-menu
"s" 'show-second-mode-key-binding
)
73 (add-menu-key 'help-menu
"r" 'show-circulate-mode-key-binding
)
74 (add-menu-key 'help-menu
"e" 'show-expose-window-mode-key-binding
)
75 (add-menu-key 'help-menu
"c" 'show-corner-help
)
76 (add-menu-key 'help-menu
"g" 'show-config-variable
)
77 (add-menu-key 'help-menu
"d" 'show-date
)
78 (add-menu-key 'help-menu
"p" 'show-cpu-proc
)
79 (add-menu-key 'help-menu
"m" 'show-mem-proc
)
80 (add-menu-key 'help-menu
"v" 'show-version
)
83 (add-menu-key 'child-menu
"r" 'rename-current-child
)
84 (add-menu-key 'child-menu
"t" 'set-current-child-transparency
)
85 (add-menu-key 'child-menu
"b" 'set-current-child-border-size
)
86 (add-menu-key 'child-menu
"e" 'ensure-unique-name
)
87 (add-menu-key 'child-menu
"n" 'ensure-unique-number
)
88 (add-menu-key 'child-menu
"Delete" 'delete-current-child
)
89 (add-menu-key 'child-menu
"X" 'remove-current-child
)
90 (add-menu-key 'child-menu
"R" 'retrieve-existing-window
)
91 (add-menu-key 'child-menu
"h" 'hide-current-child
)
92 (add-menu-key 'child-menu
"u" 'unhide-a-child
)
93 (add-menu-key 'child-menu
"f" 'unhide-a-child-from-all-frames
)
94 (add-menu-key 'child-menu
"a" 'unhide-all-children
)
95 (add-menu-key 'child-menu
"Page_Up" 'frame-lower-child
)
96 (add-menu-key 'child-menu
"Page_Down" 'frame-raise-child
)
98 (add-menu-key 'root-menu
"n" 'select-next-root-restart-menu
)
99 (add-menu-key 'root-menu
"p" 'select-previous-root-restart-menu
)
100 (add-menu-key 'root-menu
"g" 'rotate-root-geometry-next-restart-menu
)
101 (add-menu-key 'root-menu
"f" 'rotate-root-geometry-previous-restart-menu
)
102 (add-menu-key 'root-menu
"x" 'exchange-root-geometry-with-mouse
)
103 (add-menu-key 'root-menu
"r" 'change-current-root-geometry
)
106 (add-sub-menu 'frame-menu
"a" 'frame-adding-menu
"Adding frame menu")
107 (add-sub-menu 'frame-menu
"l" 'frame-layout-menu
"Frame layout menu")
108 (add-sub-menu 'frame-menu
"n" 'frame-nw-hook-menu
"Frame new window hook menu")
109 (add-sub-menu 'frame-menu
"m" 'frame-movement-menu
"Frame movement menu")
110 (add-sub-menu 'frame-menu
"f" 'frame-focus-policy
"Frame focus policy menu")
111 (add-sub-menu 'frame-menu
"w" 'frame-managed-window-menu
"Managed window type menu")
112 (add-sub-menu 'frame-menu
"u" 'frame-unmanaged-window-menu
"Unmanaged window behaviour")
113 (add-sub-menu 'frame-menu
"s" 'frame-miscellaneous-menu
"Frame miscallenous menu")
114 (add-menu-key 'frame-menu
"x" 'frame-toggle-maximize
)
117 (add-menu-key 'frame-adding-menu
"a" 'add-default-frame
)
118 (add-menu-key 'frame-adding-menu
"p" 'add-placed-frame
)
121 (add-sub-menu 'frame-movement-menu
"p" 'frame-pack-menu
"Frame pack menu")
122 (add-sub-menu 'frame-movement-menu
"f" 'frame-fill-menu
"Frame fill menu")
123 (add-sub-menu 'frame-movement-menu
"r" 'frame-resize-menu
"Frame resize menu")
124 (add-menu-key 'frame-movement-menu
"c" 'center-current-frame
)
125 (add-menu-key 'frame-movement-menu
"R" 'with-movement-select-next-brother
)
126 (add-menu-key 'frame-movement-menu
"L" 'with-movement-select-previous-brother
)
127 (add-menu-key 'frame-movement-menu
"U" 'with-movement-select-next-level
)
128 (add-menu-key 'frame-movement-menu
"D" 'with-movement-select-previous-level
)
129 (add-menu-key 'frame-movement-menu
"T" 'with-movement-select-next-child
)
132 (add-menu-key 'frame-pack-menu
"u" 'current-frame-pack-up
)
133 (add-menu-key 'frame-pack-menu
"d" 'current-frame-pack-down
)
134 (add-menu-key 'frame-pack-menu
"l" 'current-frame-pack-left
)
135 (add-menu-key 'frame-pack-menu
"r" 'current-frame-pack-right
)
138 (add-menu-key 'frame-fill-menu
"u" 'current-frame-fill-up
)
139 (add-menu-key 'frame-fill-menu
"d" 'current-frame-fill-down
)
140 (add-menu-key 'frame-fill-menu
"l" 'current-frame-fill-left
)
141 (add-menu-key 'frame-fill-menu
"r" 'current-frame-fill-right
)
142 (add-menu-key 'frame-fill-menu
"a" 'current-frame-fill-all-dir
)
143 (add-menu-key 'frame-fill-menu
"v" 'current-frame-fill-vertical
)
144 (add-menu-key 'frame-fill-menu
"h" 'current-frame-fill-horizontal
)
146 (add-menu-key 'frame-resize-menu
"u" 'current-frame-resize-up
)
147 (add-menu-key 'frame-resize-menu
"d" 'current-frame-resize-down
)
148 (add-menu-key 'frame-resize-menu
"l" 'current-frame-resize-left
)
149 (add-menu-key 'frame-resize-menu
"r" 'current-frame-resize-right
)
150 (add-menu-key 'frame-resize-menu
"a" 'current-frame-resize-all-dir
)
151 (add-menu-key 'frame-resize-menu
"m" 'current-frame-resize-all-dir-minimal
)
154 (add-menu-comment 'frame-focus-policy
"-=- For the current frame -=-")
155 (add-menu-key 'frame-focus-policy
"a" 'current-frame-set-click-focus-policy
)
156 (add-menu-key 'frame-focus-policy
"b" 'current-frame-set-sloppy-focus-policy
)
157 (add-menu-key 'frame-focus-policy
"c" 'current-frame-set-sloppy-strict-focus-policy
)
158 (add-menu-key 'frame-focus-policy
"d" 'current-frame-set-sloppy-select-policy
)
159 (add-menu-key 'frame-focus-policy
"e" 'current-frame-set-sloppy-select-window-policy
)
160 (add-menu-comment 'frame-focus-policy
"-=- For all frames -=-")
161 (add-menu-key 'frame-focus-policy
"f" 'all-frames-set-click-focus-policy
)
162 (add-menu-key 'frame-focus-policy
"g" 'all-frames-set-sloppy-focus-policy
)
163 (add-menu-key 'frame-focus-policy
"h" 'all-frames-set-sloppy-strict-focus-policy
)
164 (add-menu-key 'frame-focus-policy
"i" 'all-frames-set-sloppy-select-policy
)
165 (add-menu-key 'frame-focus-policy
"j" 'all-frames-set-sloppy-select-window-policy
)
170 (add-menu-key 'frame-managed-window-menu
"m" 'current-frame-manage-window-type
)
171 (add-menu-key 'frame-managed-window-menu
"a" 'current-frame-manage-all-window-type
)
172 (add-menu-key 'frame-managed-window-menu
"n" 'current-frame-manage-only-normal-window-type
)
173 (add-menu-key 'frame-managed-window-menu
"u" 'current-frame-manage-no-window-type
)
175 (add-menu-key 'frame-unmanaged-window-menu
"s" 'set-show-unmanaged-window
)
176 (add-menu-key 'frame-unmanaged-window-menu
"h" 'set-hide-unmanaged-window
)
177 (add-menu-key 'frame-unmanaged-window-menu
"d" 'set-default-hide-unmanaged-window
)
178 (add-menu-key 'frame-unmanaged-window-menu
"w" 'set-globally-show-unmanaged-window
)
179 (add-menu-key 'frame-unmanaged-window-menu
"i" 'set-globally-hide-unmanaged-window
)
182 (add-menu-key 'frame-miscellaneous-menu
"s" 'show-all-frames-info
)
183 (add-menu-key 'frame-miscellaneous-menu
"a" 'hide-all-frames-info
)
184 (add-menu-key 'frame-miscellaneous-menu
"h" 'hide-current-frame-window
)
185 (add-menu-key 'frame-miscellaneous-menu
"w" 'show-current-frame-window
)
186 (add-menu-key 'frame-miscellaneous-menu
"u" 'renumber-current-frame
)
187 (add-menu-key 'frame-miscellaneous-menu
"x" 'explode-current-frame
)
188 (add-menu-key 'frame-miscellaneous-menu
"i" 'implode-current-frame
)
193 (add-menu-key 'window-menu
"i" 'display-current-window-info
)
194 (add-menu-key 'window-menu
"t" 'set-current-window-transparency
)
195 (add-menu-key 'window-menu
"f" 'force-window-in-frame
)
196 (add-menu-key 'window-menu
"c" 'force-window-center-in-frame
)
197 (add-menu-key 'window-menu
"m" 'manage-current-window
)
198 (add-menu-key 'window-menu
"u" 'unmanage-current-window
)
199 (add-menu-key 'window-menu
"a" 'adapt-current-frame-to-window-hints
)
200 (add-menu-key 'window-menu
"w" 'adapt-current-frame-to-window-width-hint
)
201 (add-menu-key 'window-menu
"h" 'adapt-current-frame-to-window-height-hint
)
205 (add-menu-key 'selection-menu
"x" 'cut-current-child
)
206 (add-menu-key 'selection-menu
"c" 'copy-current-child
)
207 (add-menu-key 'selection-menu
"v" 'paste-selection
)
208 (add-menu-key 'selection-menu
"p" 'paste-selection-no-clear
)
209 (add-menu-key 'selection-menu
"Delete" 'remove-current-child
)
210 (add-menu-key 'selection-menu
"z" 'clear-selection
)
213 (add-menu-key 'action-by-name-menu
"f" 'focus-frame-by-name
)
214 (add-menu-key 'action-by-name-menu
"o" 'open-frame-by-name
)
215 (add-menu-key 'action-by-name-menu
"d" 'delete-frame-by-name
)
216 (add-menu-key 'action-by-name-menu
"m" 'move-current-child-by-name
)
217 (add-menu-key 'action-by-name-menu
"c" 'copy-current-child-by-name
)
219 (add-menu-key 'action-by-number-menu
"f" 'focus-frame-by-number
)
220 (add-menu-key 'action-by-number-menu
"o" 'open-frame-by-number
)
221 (add-menu-key 'action-by-number-menu
"d" 'delete-frame-by-number
)
222 (add-menu-key 'action-by-number-menu
"m" 'move-current-child-by-number
)
223 (add-menu-key 'action-by-number-menu
"c" 'copy-current-child-by-number
)
226 (add-menu-key 'utility-menu
"i" 'identify-key
)
227 (add-menu-key 'utility-menu
"colon" 'eval-from-query-string
)
228 (add-menu-key 'utility-menu
"exclam" 'run-program-from-query-string
)
229 (add-sub-menu 'utility-menu
"o" 'other-window-manager-menu
"Other window manager menu")
231 (add-menu-key 'other-window-manager-menu
"x" 'run-xterm
)
232 (add-menu-key 'other-window-manager-menu
"t" 'run-twm
)
233 (add-menu-key 'other-window-manager-menu
"i" 'run-icewm
)
234 (add-menu-key 'other-window-manager-menu
"g" 'run-gnome-session
)
235 (add-menu-key 'other-window-manager-menu
"k" 'run-startkde
)
236 (add-menu-key 'other-window-manager-menu
"c" 'run-xfce4-session
)
237 (add-menu-key 'other-window-manager-menu
"l" 'run-lxde
)
238 (add-menu-key 'other-window-manager-menu
"p" 'run-prompt-wm
)
241 (add-menu-key 'clfswm-menu
"r" 'reset-clfswm
)
242 (add-menu-key 'clfswm-menu
"l" 'reload-clfswm
)
243 (add-menu-key 'clfswm-menu
"x" 'exit-clfswm
)
245 (format t
" Done.~%")