Release new version 0.3.1.
[grml-desktop.git] / etc / skel / .pekwm / keys
1 $TERM="x-terminal-emulator"
2 #$TERM="x-terminal-emulator -fn fixed +sb -bg white -fg black"
3
4 Global {
5 # - - ----------------------------------------------- - -
6 # Simple bindings to most requently used actions.
7 #
8 # Adding your own frequently used actions is easy -
9 # just copy it over from CHAINS and edit the keypress!
10         # Moving in frames
11         KeyPress = "Mod1 Tab" { Actions = "NextFrame EndRaise" }
12         KeyPress = "Mod1 Shift Tab" { Actions = "PrevFrame EndRaise" }
13         KeyPress = "Mod1 Ctrl Tab" { Actions = "NextFrameMRU EndRaise" }
14         KeyPress = "Mod1 Ctrl Shift Tab" { Actions = "PrevFrameMRU EndRaise" }
15         KeyPress = "Mod4 Tab" { Actions = "NextInFrame" }
16         KeyPress = "Mod4 Shift Tab" { Actions = "PrevInFrame" }
17         KeyPress = "Mod4 Left" { Actions = "FocusDirectional Left" }
18         KeyPress = "Mod4 Right" { Actions = "FocusDirectional Right" }
19         KeyPress = "Mod4 Up" { Actions = "FocusDirectional Up" }
20         KeyPress = "Mod4 Down" { Actions = "FocusDirectional Down" }
21         # Moving in workspaces
22         KeyPress = "Ctrl Mod1 Left" { Actions = "GotoWorkspace Left" }
23         KeyPress = "Ctrl Mod1 Right" { Actions = "GotoWorkspace Right" }
24         KeyPress = "Mod4 1" { Actions = "GotoWorkspace 1" }
25         KeyPress = "Mod4 2" { Actions = "GotoWorkspace 2" }
26         KeyPress = "Mod4 3" { Actions = "GotoWorkspace 3" }
27         KeyPress = "Mod4 4" { Actions = "GotoWorkspace 4" }
28         KeyPress = "Mod4 F1" { Actions = "SendToWorkspace 1" }
29         KeyPress = "Mod4 F2" { Actions = "SendToWorkspace 2" }
30         KeyPress = "Mod4 F3" { Actions = "SendToWorkspace 3" }
31         KeyPress = "Mod4 F4" { Actions = "SendToWorkspace 4" }
32         # Simple window management
33         KeyPress = "Mod4 M" { Actions = "Toggle Maximized True True" }
34         KeyPress = "Mod4 G" { Actions = "Maxfill True True" }
35         KeyPress = "Mod4 F" { Actions = "Toggle FullScreen" }
36         KeyPress = "Mod4 Return" { Actions = "MoveResize" }
37         KeyPress = "Mod4 Q" { Actions = "Close" }
38         KeyPress = "Mod4 S" { Actions = "Toggle Shaded" }
39         KeyPress = "Mod4 I" { Actions = "Toggle Iconified" }
40         # Marking
41         KeyPress = "Mod4 Z" { Actions = "Toggle Marked" }
42         KeyPress = "Mod4 A" { Actions = "AttachMarked" }
43         # Menus
44         KeyPress = "Mod4 R" { Actions = "ShowMenu Root" }
45         KeyPress = "Mod4 W" { Actions = "ShowMenu Window" }
46         KeyPress = "Mod4 L" { Actions = "ShowMenu Goto" }
47         KeyPress = "Mod4 C" { Actions = "ShowMenu GotoClient" }
48         KeyPress = "Mod4 Shift I" { Actions = "ShowMenu Icon" }
49         KeyPress = "Mod4 H" { Actions = "HideAllMenus" }
50         # Moving in viewports (disabled from ~/.pekwm/config by default)
51         Keypress = "Mod4 KP_1" { Actions = "ViewportGoto 1 3" } # KP_
52         Keypress = "Mod4 KP_2" { Actions = "ViewportGoto 2 3" } # stands
53         Keypress = "Mod4 KP_3" { Actions = "ViewportGoto 3 3" } # for
54         Keypress = "Mod4 KP_4" { Actions = "ViewportGoto 1 2" } # keypad
55         Keypress = "Mod4 KP_5" { Actions = "ViewportGoto 2 2" }
56         Keypress = "Mod4 KP_6" { Actions = "ViewportGoto 3 2" }
57         Keypress = "Mod4 KP_7" { Actions = "ViewportGoto 1 1" }
58         Keypress = "Mod4 KP_8" { Actions = "ViewportGoto 2 1" }
59         Keypress = "Mod4 KP_9" { Actions = "ViewportGoto 3 1" }
60         # External Commands
61         KeyPress = "Mod4 E" { Actions = "Exec $TERM" }
62         KeyPress = "Mod1 x" { Actions = "Exec $TERM" }
63         KeyPress = "Mod1 Escape" { Actions = "Exec $TERM" }
64         KeyPress = "Ctrl Mod1 x" { Actions = "Exec /usr/bin/runit &" }
65         KeyPress = "Ctrl Mod1 l" { Actions = "Exec /usr/X11R6/bin/xlock &" }
66         KeyPress = "Ctrl Mod1 v" { Actions = "Exec /usr/bin/xsay &" }
67         # This requires you to have your xkb set up properly
68         # (These are the 'extra buttons' used on many keyboards)
69         # KeyPress = "XF86AudioPrev" { Actions = "Exec xmms -r" }
70         # KeyPress = "XF86AudioNext" { Actions = "Exec xmms -f" }
71         # KeyPress = "XF86AudioPlay" { Actions = "Exec xmms -t" }
72         # KeyPress = "XF86AudioStop" { Actions = "Exec xmms -s" }
73         # KeyPress = "XF86AudioLowerVolume" { Actions = "Exec aumix -w-5" }
74         # KeyPress = "XF86AudioRaiseVolume" { Actions = "Exec aumix -w+5" }
75         # KeyPress = "XF86AudioMute" { Actions = "Exec aumix -w0" }
76         # KeyPress = "XF86AudioStop" { Actions = "Exec x-terminal-emulator" }
77         # Pekwm control
78         KeyPress = "Ctrl Mod1 Delete" { Actions = "Reload" }
79         KeyPress = "Mod4 D" { Actions = "ShowCmdDialog" }
80
81 # - - ----------------------------------------------- - -
82 # CHAINS. These give you access to just about everything.
83         # Move to Corner
84         Chain = "Ctrl Mod1 C" {
85                 KeyPress = "Q" { Actions = "MoveToEdge TopLeft" }
86                 KeyPress = "Y" { Actions = "MoveToEdge TopCenterEdge" }
87                 KeyPress = "Shift Y" { Actions = "MoveToEdge TopEdge" }
88                 KeyPress = "P" { Actions = "MoveToEdge TopRight" }
89                 KeyPress = "A" { Actions = "MoveToEdge LeftCenterEdge" }
90                 KeyPress = "Shift A" { Actions = "MoveToEdge LeftEdge" }
91                 KeyPress = "L" { Actions = "MoveToEdge RightCenterEdge" }
92                 KeyPress = "Shift L" { Actions = "MoveToEdge RightEdge" }
93                 KeyPress = "Z" { Actions = "MoveToEdge BottomLeft" }
94                 KeyPress = "B" { Actions = "MoveToEdge BottomCenterEdge" }
95                 KeyPress = "Shift B" { Actions = "MoveToEdge BottomEdge" }
96                 KeyPress = "M" { Actions = "MoveToEdge BottomRight" }
97                 KeyPress = "H" { Actions = "MoveToEdge Center" }
98         }
99         # Menus
100         Chain = "Ctrl Mod1 M" {
101                 KeyPress = "R" { Actions = "ShowMenu Root" }
102                 KeyPress = "W" { Actions = "ShowMenu Window" }
103                 KeyPress = "I" { Actions = "ShowMenu Icon" }
104                 KeyPress = "G" { Actions = "ShowMenu Goto" }
105                 KeyPress = "C" { Actions = "ShowMenu GotoClient" }
106                 KeyPress = "D" { Actions = "ShowMenu Decor" }
107                 KeyPress = "A" { Actions = "ShowMenu AttachClientInFrame" }
108                 KeyPress = "F" { Actions = "ShowMenu AttachFrameInFrame" }
109                 Keypress = "Shift A" { Actions = "ShowMenu AttachClient" }
110                 Keypress = "Shift F" { Actions = "ShowMenu AttachFrame" }
111                 KeyPress = "H" { Actions = "HideAllMenus" }
112         }
113         # Grouping
114         Chain = "Ctrl Mod1 T" {
115                 KeyPress = "T" { Actions = "Toggle Tagged False" }
116                 KeyPress = "B" { Actions = "Toggle Tagged True" }
117                 KeyPress = "C" { Actions = "Unset Tagged" }
118                 KeyPress = "G" { Actions = "Toggle GlobalGrouping" }
119                 KeyPress = "M" { Actions = "Toggle Marked" }
120                 KeyPress = "A" { Actions = "AttachMarked" }
121                 KeyPress = "D" { Actions = "Detach" }
122                 Keypress = "P" { Actions = "AttachClientInNextFrame" }
123                 KeyPress = "O" { Actions = "AttachClientInPrevFrame" }
124                 Keypress = "I" { Actions = "AttachFrameInNextFrame" }
125                 KeyPress = "U" { Actions = "AttachFrameInPrevFrame" }
126         }
127         # Decor Toggles
128         Chain = "Ctrl Mod1 D" {
129                 KeyPress = "B" { Actions = "Toggle DecorBorder" }
130                 KeyPress = "T" { Actions = "Toggle DecorTitlebar" }
131                 KeyPress = "D" { Actions = "Toggle DecorBorder; Toggle DecorTitlebar" }
132         }
133         # Window Actions
134         Chain = "Ctrl Mod1 A" {
135                 Chain = "G" {
136                         KeyPress = "G" { Actions = "MaxFill True True" }
137                         KeyPress = "V" { Actions = "MaxFill False True" }
138                         KeyPress = "H" { Actions = "MaxFill True False" }
139                 }
140                 Chain = "M" {
141                         KeyPress = "M" { Actions = "Toggle Maximized True True" }
142                         KeyPress = "V" { Actions = "Toggle Maximized False True" }
143                         KeyPress = "H" { Actions = "Toggle Maximized True False" }
144                 }
145                 Chain = "Q" {
146                         KeyPress = "Q" { Actions = "Close" }
147                         KeyPress = "F" { Actions = "CloseFrame" }
148                         KeyPress = "K" { Actions = "Kill" }
149                 }
150                 KeyPress = "S" { Actions = "Toggle Shaded" }
151                 KeyPress = "A" { Actions = "Toggle Sticky" }
152                 KeyPress = "O" { Actions = "Toggle AlwaysOnTop" }
153                 KeyPress = "B" { Actions = "Toggle AlwaysBelow" }
154                 KeyPress = "I" { Actions = "Set Iconified" }
155                 KeyPress = "R" { Actions = "Raise" }
156                 KeyPress = "Shift R" { Actions = "RaiseFamily" }
157                 KeyPress = "L" { Actions = "Lower" }
158                 KeyPress = "Shift L" { Actions = "LowerFamily" }
159                 KeyPress = "X" { Actions = "ActivateOrRaise" }
160                 KeyPress = "Return" { Actions = "MoveResize" }
161                 KeyPress = "F" { Actions = "Toggle Fullscreen" }
162                 KeyPress = "Left" { Actions = "GrowDirection Left" }
163                 KeyPress = "Right" { Actions = "GrowDirection Right" }
164                 KeyPress = "Up" { Actions = "GrowDirection Up" }
165                 KeyPress = "Down" { Actions = "GrowDirection Down" }
166         }
167         # Moving in Frames
168         Chain = "Ctrl Mod1 F" {
169                 KeyPress = "P" { Actions = "NextFrame AlwaysRaise" }
170                 KeyPress = "O" { Actions = "PrevFrame AlwaysRaise" }
171                 KeyPress = "Shift P" { Actions = "NextFrameMRU EndRaise" }
172                 KeyPress = "Shift O" { Actions = "PrevFrameMRU EndRaise" }
173                 KeyPress = "I" { Actions = "NextInFrame" }
174                 KeyPress = "U" { Actions = "PrevInFrame" }
175                 KeyPress = "Shift I" { Actions = "MoveClientNext" }
176                 KeyPress = "Shift U" { Actions = "MoveClientPrev" }
177                 KeyPress = "Up" { Actions = "FocusDirectional Up" }
178                 KeyPress = "Down" { Actions = "FocusDirectional Down" }
179                 KeyPress = "Left" { Actions = "FocusDirectional Left" }
180                 Keypress = "Right" { Actions = "FocusDirectional Right" }
181                 KeyPress = "1" { Actions = "ActivateClientNum 1" }
182                 KeyPress = "2" { Actions = "ActivateClientNum 2" }
183                 KeyPress = "3" { Actions = "ActivateClientNum 3" }
184                 KeyPress = "4" { Actions = "ActivateClientNum 4" }
185                 KeyPress = "5" { Actions = "ActivateClientNum 5" }
186                 KeyPress = "6" { Actions = "ActivateClientNum 6" }
187                 KeyPress = "7" { Actions = "ActivateClientNum 7" }
188                 KeyPress = "8" { Actions = "ActivateClientNum 8" }
189                 KeyPress = "9" { Actions = "ActivateClientNum 9" }
190                 KeyPress = "0" { Actions = "ActivateClientNum 0" }
191         }
192         # Workspaces and viewports
193         Chain = "Ctrl Mod1 W" {
194                 KeyPress = "Right" { Actions = "GoToWorkspace Right" }
195                 KeyPress = "Left" { Actions = "GoToWorkspace Left" }
196                 KeyPress = "1" { Actions = "GoToWorkspace 1" }
197                 KeyPress = "2" { Actions = "GoToWorkspace 2" }
198                 KeyPress = "3" { Actions = "GoToWorkspace 3" }
199                 KeyPress = "4" { Actions = "GoToWorkspace 4" }
200                 KeyPress = "F1" { Actions = "SendToWorkspace 1" }
201                 KeyPress = "F2" { Actions = "SendToWorkspace 2" }
202                 KeyPress = "F3" { Actions = "SendToWorkspace 3" }
203                 KeyPress = "F4" { Actions = "SendToWorkspace 4" }
204                 Keypress = "Shift Up" { Actions = "ViewportMoveDirection Up" }
205                 Keypress = "Shift Down" { Actions = "ViewportMoveDirection Down" }
206                 Keypress = "Shift Left" { Actions = "ViewportMoveDirection Left" }
207                 Keypress = "Shift Right" { Actions = "ViewportMoveDirection Right" }
208                 Keypress = "KP_1" { Actions = "ViewportGoto 1 3" } # KP_
209                 Keypress = "KP_2" { Actions = "ViewportGoto 2 3" } # stands
210                 Keypress = "KP_3" { Actions = "ViewportGoto 3 3" } # for
211                 Keypress = "KP_4" { Actions = "ViewportGoto 1 2" } # keypad
212                 Keypress = "KP_5" { Actions = "ViewportGoto 2 2" }
213                 Keypress = "KP_6" { Actions = "ViewportGoto 3 2" }
214                 Keypress = "KP_7" { Actions = "ViewportGoto 1 1" }
215                 Keypress = "KP_8" { Actions = "ViewportGoto 2 1" }
216                 Keypress = "KP_9" { Actions = "ViewportGoto 3 1" }
217         }
218         # External commands
219         Chain = "Ctrl Mod1 E" {
220                 KeyPress = "E" { Actions = "Exec $TERM" }
221                 KeyPress = "L" { Actions = "Exec xlock -mode blank &" }
222                 KeyPress = "S" { Actions = "Exec scrot &" }
223         }
224         # Wm actions
225         Chain = "Ctrl Mod1 P" {
226                 KeyPress = "Delete" { Actions = "Reload" }
227                 KeyPress = "Next" { Actions = "Restart" }
228                 KeyPress = "End" { Actions = "Exit" }
229                 KeyPress = "Prev" { Actions = "RestartOther twm" }
230                 KeyPress = "D" { Actions = "ShowCmdDialog" }
231         }
232         # Skipping
233         Chain = "Ctrl Mod1 S" {
234                 Keypress = "M" { Actions = "Toggle Skip Menus" }
235                 Keypress = "F" { Actions = "Toggle Skip FocusToggle" }
236                 Keypress = "S" { Actions = "Toggle Skip Snap" }
237         }
238 }
239
240 # Keys when MoveResize is active
241 MoveResize {
242         KeyPress = "Left" { Actions = "MoveHorizontal -10" }
243         KeyPress = "Right" { Actions = "MoveHorizontal 10" }
244         KeyPress = "Up" { Actions = "MoveVertical -10" }
245         KeyPress = "Down" { Actions = "MoveVertical 10" }
246         Keypress = "Shift Left" { Actions = "MoveHorizontal -1" }
247         Keypress = "Shift Right" { Actions = "MoveHorizontal 1" }
248         Keypress = "Shift Up" { Actions = "MoveVertical -1" }
249         Keypress = "Shift Down" { Actions = "MoveVertical 1" }
250         Keypress = "Mod4 Left" { Actions = "ResizeHorizontal -10" }
251         Keypress = "Mod4 Right" { Actions = "ResizeHorizontal 10" }
252         Keypress = "Mod4 Up" { Actions = "ResizeVertical -10" }
253         Keypress = "Mod4 Down" { Actions = "ResizeVertical 10" }
254         Keypress = "Mod1 Left" { Actions = "ResizeHorizontal -10" }
255         Keypress = "Mod1 Right" { Actions = "ResizeHorizontal 10" }
256         Keypress = "Mod1 Up" { Actions = "ResizeVertical -10" }
257         Keypress = "Mod1 Down" { Actions = "ResizeVertical 10" }
258         Keypress = "Shift Mod4 Left" { Actions = "ResizeHorizontal -1" }
259         Keypress = "Shift Mod4 Right" { Actions = "ResizeHorizontal 1" }
260         Keypress = "Shift Mod4 Up" { Actions = "ResizeVertical -1" }
261         Keypress = "Shift Mod4 Down" { Actions = "ResizeVertical 1" }
262         Keypress = "Shift Mod1 Left" { Actions = "ResizeHorizontal -1" }
263         Keypress = "Shift Mod1 Right" { Actions = "ResizeHorizontal 1" }
264         Keypress = "Shift Mod1 Up" { Actions = "ResizeVertical -1" }
265         Keypress = "Shift Mod1 Down" { Actions = "ResizeVertical 1" }
266         Keypress = "s" { Actions = "MoveSnap" }
267         Keypress = "Escape" { Actions = "Cancel" }
268         Keypress = "q" { Actions = "Cancel" }
269         Keypress = "Return" { Actions = "End" }
270 }
271
272 # Keys for CmdDialog editing
273 CmdDialog {
274         KeyPress = "Left" { Actions = "CursPrev" }
275         KeyPress = "Right" { Actions = "CursNext" }
276         KeyPress = "BackSpace" { Actions = "Erase" }
277         KeyPress = "Ctrl K" { Actions = "Clear" }
278         KeyPress = "Return" { Actions = "Exec" }
279         KeyPress = "Escape" { Actions = "Close" }
280         KeyPress = "Up" { Actions = "HistPrev" }
281         KeyPress = "Down" { Actions = "HistNext" }
282         KeyPress = "Any Any" { Actions = "Insert" }
283 }
284
285 # Keys working in menus
286 Menu {
287         KeyPress = "Down" { Actions = "NextItem" }
288         KeyPress = "Up" { Actions = "PrevItem" }
289         KeyPress = "Left" { Actions = "LeaveSubmenu" }
290         KeyPress = "Right" { Actions = "EnterSubmenu" }
291         KeyPress = "Return" { Actions = "Select" }
292         KeyPress = "space" { Actions = "Select" }
293         KeyPress = "Escape" { Actions = "Close" }
294         KeyPress = "q" { Actions = "Close" }
295 }
296