src/clfswm-menu.lisp (open-menu): Save info hash table keys instead of deleting newly...
[clfswm.git] / src / menu-def.lisp
blobcf1dfb9584a887238849fad563f03e3cbe7b6a3e
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) 2011 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 (add-menu-key 'help-menu "a" 'show-first-aid-kit)
66 (add-menu-key 'help-menu "h" 'show-global-key-binding)
67 (add-menu-key 'help-menu "b" 'show-main-mode-key-binding)
68 (add-menu-key 'help-menu "s" 'show-second-mode-key-binding)
69 (add-menu-key 'help-menu "r" 'show-circulate-mode-key-binding)
70 (add-menu-key 'help-menu "e" 'show-expose-window-mode-key-binding)
71 (add-menu-key 'help-menu "c" 'show-corner-help)
72 (add-menu-key 'help-menu "g" 'show-config-variable)
73 (add-menu-key 'help-menu "d" 'show-date)
74 (add-menu-key 'help-menu "p" 'show-cpu-proc)
75 (add-menu-key 'help-menu "m" 'show-mem-proc)
76 (add-menu-key 'help-menu "v" 'show-version)
79 (add-menu-key 'child-menu "r" 'rename-current-child)
80 (add-menu-key 'child-menu "e" 'ensure-unique-name)
81 (add-menu-key 'child-menu "n" 'ensure-unique-number)
82 (add-menu-key 'child-menu "Delete" 'delete-current-child)
83 (add-menu-key 'child-menu "X" 'remove-current-child)
84 (add-menu-key 'child-menu "h" 'hide-current-child)
85 (add-menu-key 'child-menu "u" 'unhide-a-child)
86 (add-menu-key 'child-menu "f" 'unhide-a-child-from-all-frames)
87 (add-menu-key 'child-menu "a" 'unhide-all-children)
88 (add-menu-key 'child-menu "Page_Up" 'frame-lower-child)
89 (add-menu-key 'child-menu "Page_Down" 'frame-raise-child)
93 (add-sub-menu 'frame-menu "a" 'frame-adding-menu "Adding frame menu")
94 (add-sub-menu 'frame-menu "l" 'frame-layout-menu "Frame layout menu")
95 (add-sub-menu 'frame-menu "n" 'frame-nw-hook-menu "Frame new window hook menu")
96 (add-sub-menu 'frame-menu "m" 'frame-movement-menu "Frame movement menu")
97 (add-sub-menu 'frame-menu "f" 'frame-focus-policy "Frame focus policy menu")
98 (add-sub-menu 'frame-menu "w" 'frame-managed-window-menu "Managed window type menu")
99 (add-sub-menu 'frame-menu "u" 'frame-unmanaged-window-menu "Unmanaged window behaviour")
100 (add-sub-menu 'frame-menu "s" 'frame-miscellaneous-menu "Frame miscallenous menu")
101 (add-menu-key 'frame-menu "x" 'frame-toggle-maximize)
104 (add-menu-key 'frame-adding-menu "a" 'add-default-frame)
105 (add-menu-key 'frame-adding-menu "p" 'add-placed-frame)
108 (add-sub-menu 'frame-movement-menu "p" 'frame-pack-menu "Frame pack menu")
109 (add-sub-menu 'frame-movement-menu "f" 'frame-fill-menu "Frame fill menu")
110 (add-sub-menu 'frame-movement-menu "r" 'frame-resize-menu "Frame resize menu")
111 (add-menu-key 'frame-movement-menu "c" 'center-current-frame)
112 (add-menu-key 'frame-movement-menu "Right" 'with-movement-select-next-brother)
113 (add-menu-key 'frame-movement-menu "Left" 'with-movement-select-previous-brother)
114 (add-menu-key 'frame-movement-menu "Up" 'with-movement-select-next-level)
115 (add-menu-key 'frame-movement-menu "Down" 'with-movement-select-previous-level)
116 (add-menu-key 'frame-movement-menu "Tab" 'with-movement-select-next-child)
119 (add-menu-key 'frame-pack-menu "Up" 'current-frame-pack-up)
120 (add-menu-key 'frame-pack-menu "Down" 'current-frame-pack-down)
121 (add-menu-key 'frame-pack-menu "Left" 'current-frame-pack-left)
122 (add-menu-key 'frame-pack-menu "Right" 'current-frame-pack-right)
125 (add-menu-key 'frame-fill-menu "Up" 'current-frame-fill-up)
126 (add-menu-key 'frame-fill-menu "Down" 'current-frame-fill-down)
127 (add-menu-key 'frame-fill-menu "Left" 'current-frame-fill-left)
128 (add-menu-key 'frame-fill-menu "Right" 'current-frame-fill-right)
129 (add-menu-key 'frame-fill-menu "a" 'current-frame-fill-all-dir)
130 (add-menu-key 'frame-fill-menu "v" 'current-frame-fill-vertical)
131 (add-menu-key 'frame-fill-menu "h" 'current-frame-fill-horizontal)
133 (add-menu-key 'frame-resize-menu "Up" 'current-frame-resize-up)
134 (add-menu-key 'frame-resize-menu "Down" 'current-frame-resize-down)
135 (add-menu-key 'frame-resize-menu "Left" 'current-frame-resize-left)
136 (add-menu-key 'frame-resize-menu "Right" 'current-frame-resize-right)
137 (add-menu-key 'frame-resize-menu "a" 'current-frame-resize-all-dir)
138 (add-menu-key 'frame-resize-menu "m" 'current-frame-resize-all-dir-minimal)
141 (add-menu-comment 'frame-focus-policy "-=- For the current frame -=-")
142 (add-menu-key 'frame-focus-policy "a" 'current-frame-set-click-focus-policy)
143 (add-menu-key 'frame-focus-policy "b" 'current-frame-set-sloppy-focus-policy)
144 (add-menu-key 'frame-focus-policy "c" 'current-frame-set-sloppy-strict-focus-policy)
145 (add-menu-key 'frame-focus-policy "d" 'current-frame-set-sloppy-select-policy)
146 (add-menu-comment 'frame-focus-policy "-=- For all frames -=-")
147 (add-menu-key 'frame-focus-policy "e" 'all-frames-set-click-focus-policy)
148 (add-menu-key 'frame-focus-policy "f" 'all-frames-set-sloppy-focus-policy)
149 (add-menu-key 'frame-focus-policy "g" 'all-frames-set-sloppy-strict-focus-policy)
150 (add-menu-key 'frame-focus-policy "h" 'all-frames-set-sloppy-select-policy)
155 (add-menu-key 'frame-managed-window-menu "m" 'current-frame-manage-window-type)
156 (add-menu-key 'frame-managed-window-menu "a" 'current-frame-manage-all-window-type)
157 (add-menu-key 'frame-managed-window-menu "n" 'current-frame-manage-only-normal-window-type)
158 (add-menu-key 'frame-managed-window-menu "u" 'current-frame-manage-no-window-type)
160 (add-menu-key 'frame-unmanaged-window-menu "s" 'set-show-unmanaged-window)
161 (add-menu-key 'frame-unmanaged-window-menu "h" 'set-hide-unmanaged-window)
162 (add-menu-key 'frame-unmanaged-window-menu "d" 'set-default-hide-unmanaged-window)
163 (add-menu-key 'frame-unmanaged-window-menu "w" 'set-globally-show-unmanaged-window)
164 (add-menu-key 'frame-unmanaged-window-menu "i" 'set-globally-hide-unmanaged-window)
167 (add-menu-key 'frame-miscellaneous-menu "s" 'show-all-frames-info)
168 (add-menu-key 'frame-miscellaneous-menu "i" 'hide-all-frames-info)
169 (add-menu-key 'frame-miscellaneous-menu "h" 'hide-current-frame-window)
170 (add-menu-key 'frame-miscellaneous-menu "w" 'show-current-frame-window)
171 (add-menu-key 'frame-miscellaneous-menu "u" 'renumber-current-frame)
172 (add-menu-key 'frame-miscellaneous-menu "x" 'explode-current-frame)
177 (add-menu-key 'window-menu "i" 'display-current-window-info)
178 (add-menu-key 'window-menu "f" 'force-window-in-frame)
179 (add-menu-key 'window-menu "c" 'force-window-center-in-frame)
180 (add-menu-key 'window-menu "m" 'manage-current-window)
181 (add-menu-key 'window-menu "u" 'unmanage-current-window)
182 (add-menu-key 'window-menu "a" 'adapt-current-frame-to-window-hints)
183 (add-menu-key 'window-menu "w" 'adapt-current-frame-to-window-width-hint)
184 (add-menu-key 'window-menu "h" 'adapt-current-frame-to-window-height-hint)
188 (add-menu-key 'selection-menu "x" 'cut-current-child)
189 (add-menu-key 'selection-menu "c" 'copy-current-child)
190 (add-menu-key 'selection-menu "v" 'paste-selection)
191 (add-menu-key 'selection-menu "p" 'paste-selection-no-clear)
192 (add-menu-key 'selection-menu "Delete" 'remove-current-child)
193 (add-menu-key 'selection-menu "z" 'clear-selection)
197 (add-menu-key 'action-by-name-menu "f" 'focus-frame-by-name)
198 (add-menu-key 'action-by-name-menu "o" 'open-frame-by-name)
199 (add-menu-key 'action-by-name-menu "d" 'delete-frame-by-name)
200 (add-menu-key 'action-by-name-menu "m" 'move-current-child-by-name)
201 (add-menu-key 'action-by-name-menu "c" 'copy-current-child-by-name)
203 (add-menu-key 'action-by-number-menu "f" 'focus-frame-by-number)
204 (add-menu-key 'action-by-number-menu "o" 'open-frame-by-number)
205 (add-menu-key 'action-by-number-menu "d" 'delete-frame-by-number)
206 (add-menu-key 'action-by-number-menu "m" 'move-current-child-by-number)
207 (add-menu-key 'action-by-number-menu "c" 'copy-current-child-by-number)
210 (add-menu-key 'utility-menu "i" 'identify-key)
211 (add-menu-key 'utility-menu "colon" 'eval-from-query-string)
212 (add-menu-key 'utility-menu "exclam" 'run-program-from-query-string)
213 (add-sub-menu 'utility-menu "o" 'other-window-manager-menu "Other window manager menu")
215 (add-menu-key 'other-window-manager-menu "x" 'run-xterm)
216 (add-menu-key 'other-window-manager-menu "t" 'run-twm)
217 (add-menu-key 'other-window-manager-menu "i" 'run-icewm)
218 (add-menu-key 'other-window-manager-menu "g" 'run-gnome-session)
219 (add-menu-key 'other-window-manager-menu "k" 'run-startkde)
220 (add-menu-key 'other-window-manager-menu "c" 'run-xfce4-session)
221 (add-menu-key 'other-window-manager-menu "l" 'run-lxde)
222 (add-menu-key 'other-window-manager-menu "p" 'run-prompt-wm)
225 (add-menu-key 'clfswm-menu "r" 'reset-clfswm)
226 (add-menu-key 'clfswm-menu "l" 'reload-clfswm)
227 (add-menu-key 'clfswm-menu "x" 'exit-clfswm)