]> git.phdru.name Git - dotfiles.git/blob - .fvwm/bindings
Feat(recode-filenames-recursive): Allow to omit parameters
[dotfiles.git] / .fvwm / bindings
1 #-----------------------------------------------------------------------------#
2 #
3 # 9. Mouse, frame buttons and keyboard bindings
4 #
5 #-----------------------------------------------------------------------------#
6
7
8 #------------------------------------------------------------------------------
9 # First, for the mouse in the root window (Context=R)
10 # Button 1 gives the Utilities menu
11 # Button 2 gives the Window Ops menu
12 # Button 3 gives the WindowList (like TwmWindows)
13 # I use the AnyModifier (A) option for the modifier field, so you can hold down
14 # any Shift-Ctrl-whatever combination you want!
15 # Moreover on a window the same bindings are defined with the Alt modifier
16 #------------------------------------------------------------------------------
17
18
19 #     Button    Context Modifi  Function
20
21 Mouse 1         R       A       Menu Utilities mouse -1p -1p
22 Mouse 2         R       A       Menu Window mouse -1p -1p
23 Mouse 3         R       A       WindowList mouse -1p -1p
24 Mouse 3         R       C       WindowList mouse -1p -1p OnlyListSkip
25
26 #Mouse 1                W       M       Menu Utilities mouse -1p -1p
27 #Mouse 2                W       M       Menu Window mouse -1p -1p
28 #Mouse 3         W       M       WindowList mouse -1p -1p
29 #Mouse 3         W       CM      WindowList mouse -1p -1p OnlyListSkip
30
31
32 #G_SESSION 3 bind Shift Mouse * to gnomebutton
33 #Mouse 1                R       S       GnomeButton
34 #Mouse 2                R       S       GnomeButton
35 #Mouse 3                R       S       GnomeButton
36
37 #------------------------------------------------------------------------------
38 # Now the rest of the frame
39 # Here I invoke my complex functions for Move-or-lower, Move-or-Raise-Shade,
40 # and Resize-or-Raise.
41 #------------------------------------------------------------------------------
42
43 # Button 1 in the corners or sides, with any modifiers, gives resize or raise
44 Mouse 1         FS      A       Function "Resize-or-Raise-or-Shade"
45
46 # Button 1 in the title, sides, w/ any modifiers, gives move or raise or shade
47 Mouse 1         T       A       Function "Move-or-Raise-or-Shade"
48 Mouse 1         FS      C       Function "Move-or-Raise-or-Shade"
49
50 # Button 1 in an icons gives move for a drag, de-iconify for a double-click,
51 # raiselower for a single click
52 Mouse 1         I       A       Function "Move-or-Iconify-or-Raise"
53 # Alt Button 1 on an icons raise all icons
54 Mouse 1         I       M       All (CurrentPage Iconic) Raise
55
56 # Button 2 in an icon, w/ any modifiers, gives de-iconify
57 Mouse 2         I       A       Iconify
58
59 # Button 2 in the corners, sides, or title-bar gives the window ops menu
60 Mouse 2         FST     A       Menu Window-Ops2
61
62 # Button 3 anywhere in the decoration (except the title-bar buttons)
63 # does a raise-lower
64 Mouse 3         TSF     A       RaiseLower
65
66 # Button 3 on a icon:
67 Mouse 3         I       A       Menu Window-Ops3 c+0 -101m
68
69 # Button 3 in the window, with the Modifier-1 key (usually alt or diamond)
70 # gives Raise-Lower. Used to use control here, but that interferes with xterm
71 Mouse 3         W       SM       RaiseLower
72
73
74 #-----------------------------------------------------------------------------
75 # Mouse windows buttons binding
76 # buttons: 1 3 5 7 9              8 6 4 2
77 #------------------------------------------------------------------------------
78
79
80 #     Button    Context Modif   Function
81 Mouse 1         1       A       Function "window_ops_func"
82 Mouse 2         1       A       Menu WindowGroupOps
83 Mouse 3         1       A       Menu Move-Window
84 Mouse 1         2       A       Close
85 Mouse 2         2       A       All ($c) Close
86 Mouse 3         2       A       Destroy
87 Mouse 1         4       A       Maximize 100 100
88 Mouse 2         4       A       Maximize 0 100
89 Mouse 3         4       A       Maximize 100 0
90 Mouse 1         6       A       Iconify
91 Mouse 2         6       A       All ($c) Iconify On
92 Mouse 3         6       A       All ($c) WindowShade On
93
94 #------------------------------------------------------------------------------
95 # Now some keyboard shortcuts.
96 #------------------------------------------------------------------------------
97
98 #------------------------------------------------------------------------------
99 # press arrow + Shift anywhere, and scroll by 1 page
100 #------------------------------------------------------------------------------
101
102 #Key Left       A       S       Scroll -100 0
103 #Key Right      A       S       Scroll +100 +0
104 #Key Up         A       S       Scroll +0   -100
105 #Key Down       A       S       Scroll +0   +100
106
107 #------------------------------------------------------------------------------
108 # press arrow + Alt key, and scroll by 1/10 of a page
109 #------------------------------------------------------------------------------
110
111 #Key Left       A       M       Scroll -10 +0
112 #Key Right      A       M       Scroll +10 +0
113 #Key Up         A       M       Scroll +0   -10
114 #Key Down       A       M       Scroll +0   +10
115
116 #------------------------------------------------------------------------------
117 # press arrow + control-meta anywhere, and move the pointer by 1% of a page
118 #------------------------------------------------------------------------------
119
120 #Key Left       A       MC      CursorMove -1 0
121 #Key Right      A       MC      CursorMove +1 +0
122 #Key Up         A       MC      CursorMove +0   -1
123 #Key Down       A       MC      CursorMove +0   +1
124
125 #------------------------------------------------------------------------------
126 # press arrow + Shift-Alt key, and move the pointer by 1/10 of a page
127 #------------------------------------------------------------------------------
128
129 #Key Left       A       SM      CursorMove -10 +0
130 #Key Right      A       SM      CursorMove +10 +0
131 #Key Up         A       SM      CursorMove +0   -10
132 #Key Down       A       SM      CursorMove +0   +10
133
134 #------------------------------------------------------------------------------
135 # Page Up/Page Down keys are used to scroll by one desktop page
136 # in any context, press page up/down + control + alt
137 # in root context, just pressing page up/down is OK
138 #------------------------------------------------------------------------------
139
140 #Key Next       A       CM      Desk  -1 0 0 3
141 #Key Next       R       M       Desk  -1 0 0 3
142 #Key Prior      A       CM      Desk  +1 0 0 3
143 #Key Prior      R       M       Desk  +1 0 0 3
144
145 #------------------------------------------------------------------------------
146 # Alt-Shift-Fx window operations
147 #------------------------------------------------------------------------------
148 #Key F4         A       MS      Close
149 #Key F5         A       MS      RaiseLower
150 #Key F6         A       MS      All (Iconic) Raise  # originally Restore
151 #Key F7         A       MS      Move
152 #Key F8         A       MS      Resize
153 #Key F9         A       MS      Iconify
154 #Key F10                A       MS      Maximize 100 100
155 #Key F11                A       MS      FvwmIdent
156 #Key F12                A       MS      FvwmConsole
157
158 #------------------------------------------------------------------------------
159 # The menus via Alt-Shift-Fx
160 #------------------------------------------------------------------------------
161 #Key F1         A       MS      Menu Utilities mouse -1p -1p
162 #Key F2         A       MS      Menu Window mouse -1p -1p
163 #Key F3         A       MS      WindowList mouse -1p -1p
164
165
166 #------------------------------------------------------------------------------
167 # The famous Alt-tab binding
168 #------------------------------------------------------------------------------
169
170 DestroyFunc my_dbltab2
171 AddToFunc   my_dbltab2
172 + I WindowListFunc $w
173 DestroyFunc my_dbltab_prev
174 AddToFunc   my_dbltab_prev
175 + I Prev my_dbltab2
176
177 #Key Tab A M    WindowList Root c c NoGeometry, NoDeskSort, SelectOnRelease Alt_L my_dbltab_prev
178 #Key Tab        A CM    WindowList Root c c NoGeometry, OnlyListSkip, SelectOnRelease
179
180
181 #------------------------------------------------------------------------------
182 # Stroke Bindings
183 #------------------------------------------------------------------------------
184 #
185 # You need fvwm compiled with stroke support and libstroke installed
186 # See the Stroke and StrokeFunc entries in fvwm2 man page
187 # We use mostly simple stroke motion. For complex stroke motions we need
188 # to consider many sloppy stroke motions for each action.
189
190 #STROKE 2
191 Mouse   3       R       N       StrokeFunc FeedBack DrawMotion
192 Mouse   3       W       M       StrokeFunc FeedBack DrawMotion
193
194 #STROKE 2 We need to redefine the default bindings
195 Stroke  0               0       R       N       WindowList mouse -1p -1p
196 Stroke  0               0       W       M       WindowList mouse -1p -1p
197
198 #PREF 11
199 #STROKE 2 A | from the top to the bottom
200 Stroke  N852            0       R       N       Exec exec aterm
201 Stroke  N852            0       W       M       Exec exec aterm
202
203 #STROKE 2 A | from the bottom to the top
204 Stroke  N258            0       R       N       Exec exec gvim
205 Stroke  N258            0       W       M       Exec exec gvim
206
207 #STROKE 2 A / from the bottom to the top
208 Stroke  N159            0       R       N       Exec exec aterm -g 80x35 -e mc
209 Stroke  N159            0       W       M       Exec exec aterm -g 80x35 -e mc
210
211 #STROKE 2 A C from the top
212 Stroke  N9874123        0       R       N       Exec exec xcalc
213 Stroke  N9874123        0       W       M       Exec exec xcalc
214
215 #STROKE 11 A N (from the bottom)
216 Stroke  7415963         0       R       N       Exec exec netscape
217 Stroke  74148963        0       R       N       Exec exec netscape
218 Stroke  74158963        0       R       N       Exec exec netscape
219 Stroke  7418963         0       R       N       Exec exec netscape
220 Stroke  415963          0       R       N       Exec exec netscape
221
222 Stroke  7415963         0       W       M       Exec exec netscape
223 Stroke  74148963        0       W       M       Exec exec netscape
224 Stroke  74158963        0       W       M       Exec exec netscape
225 Stroke  7418963         0       W       M       Exec exec netscape
226 Stroke  415963          0       W       M       Exec exec netscape
227
228 #STROKE 4 A clockwise box from the top left
229 Stroke  N78963214       0       R       N       FvwmForm FvwmForm-QuitVerify
230 Stroke  N789632147      0       R       N       FvwmForm FvwmForm-QuitVerify
231 Stroke  N78963214       0       W       M       FvwmForm FvwmForm-QuitVerify
232 Stroke  N789632147      0       W       M       FvwmForm FvwmForm-QuitVerify
233