-
Notifications
You must be signed in to change notification settings - Fork 2
/
.ctwmrc
480 lines (405 loc) · 12.2 KB
/
.ctwmrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
#
#
# Minimal Keyboard Driven Config by Youri Mouton ([email protected])
#
#
#
# Remember the state of client windows if we're started after another
# window manager.
RestartPreviousState
Color
{
DefaultBackground "dimgrey"
DefaultForeground "white"
# Border on focused window
BorderColor "#1c678c"
# Amber:
# Border on unfocused windows.
#
# If we define both of these to the same colour, we get a solid
# border. Otherwise stippled.
BorderTileBackground "#44484c"
BorderTileForeground "#44484c"
MenuBackground "dimgrey"
MenuForeground "white"
MenuTitleBackground "dimgrey"
MenuTitleForeground "white"
TitleBackground "dimgrey"
TitleForeground "white"
IconManagerBackground "black"
IconManagerForeground "white"
IconManagerHighlight "white"
MapWindowBackground "black"
MapWindowForeground "white"
}
### Nice pointer glyphs depending on where the mouse has moved the
### pointer.
Cursors
{
Frame "left_ptr"
Title "left_ptr"
Move "left_ptr"
Resize "left_ptr"
Menu "left_ptr"
Button "left_ptr"
Wait "left_ptr"
Select "left_ptr"
Destroy "left_ptr"
Icon "left_ptr"
IconMgr "left_ptr"
}
TitleJustification "left"
### Go directly to the menu entry if the user taps the corresponding
### key, ignoring case.
IgnoreCaseInMenuSelection
DecorateTransients # Temporary child windows also get decorations.
NoGrabServer # Permit X events to update server
# while doing other stuff.
UsePPosition "on" # Honour window's own idea of placement
# when opening.
WarpCursor # Move cursor to middle of window when unhiding.
DontMoveOff # Keep things on the physical screen.
### Remove the the "opaque" lines below if you're on a fast display
### and you can move the contents of the windows instead of an
### outline. Not quite usable on an unaccellerated X server, slow
### graphics hardware or if you're running over the network with lots
### of latency.
OpaqueMove
OpaqueResize
### Size of windows (in percentage of the screen estate) where ctwm
### will show windows' contents while moving or resizing.
#OpaqueMoveThreshold 40
#OpaqueResizeThreshold 10
### Sloppy focus will only work in CTWM versions >= 3.6 and not very
### well.
#SloppyFocus
### Try not to overlap existing windows when mapping a new window.
#PackNewWindows
### Place new windows wherever. Not very random, however.
RandomPlacement "on"
# No icons, please. Ever. Just make the windows disappear.
IconifyByUnmapping
### Don't show icon managers or workspaces in windows or icon menus.
ShortAllWindowsMenus
### But let the menus stay up on screen.
StayUpMenus
### Uncomment if you want the feedback window when resizing et c in
### the middle of the screen and not in top left corner. Note that
### with Xinerama with two screens, this usually means that the window
### will be shared between two screens!
# CenterFeedbackWindow
### Avoid 'technicolor effect' on decorations if we have very few
### colours, like if you have 8 bit graphics, say.
SaveColor
{
BorderColor
BorderTileBackground
BorderTileForeground
TitleBackground
TitleForeground
}
WarpRingOnScreen
WindowRingExclude
{
"dclock"
}
### If I set the root window to contain something nice to look at, I
### don't want ctwm to repaint it when I shift workspaces.
DontPaintRootWindow
#Set up 9 workspaces. We don't define the root background colour,
#because we use the same colour on every workspace and use
#MapWindowDefaultWorkSpace below instead.
WorkSpaces
{
"1" { "dimgray" "white" }
"2" { "dimgray" "white" }
"3" { "dimgray" "white" }
"4" { "dimgray" "white" }
"5" { "dimgray" "white" }
"6" { "dimgray" "white" }
"7" { "dimgray" "white" }
"8" { "dimgray" "white" }
"9" { "dimgray" "white" }
}
# When changing workspace, restore the focus to the window in this
# workspace which last had it.
SaveWorkspaceFocus
### Configuration of the workspace manager, if visible at all.
#ShowWorkSpaceManager
#WorkSpaceManagerGeometry "400x60-0-0" 10 # Where to place it.
StartInMapState # Show little windows...
#UseThreeDWMap # ...in 3D.
# Uncomment if you want reverse colours to mark current workspace.
#ReverseCurrentWorkSpace
MapWindowCurrentWorkSpace { "rgb:c/c/c" "grey50" "white" }
MapWindowDefaultWorkSpace { "black" "grey20" "white" }
WMgrButtonShadowDepth 0
WMgrHorizButtonIndent 0
WMgrVertButtonIndent 0
### Don't show windows that occupies all workspaces in the workspace
### manager.
NoShowOccupyAll
### Menu config
#UseThreeDMenus
MenuShadowDepth 1
### Paint a thin border around windows.
BorderWidth 5
# But if we're running a ctwm, we might want to use slightly thicker
# 3D borders with a 1 pixel shadow. Uncomment below to use them.
#UseThreeDBorders
ThreeDBorderWidth 2
BorderShadowDepth 1
### But use no borders at all for these clients.
NoBorder
{
"xclock"
}
# Make a resize cursor if the user points to the border. Kind of hard
# with a 1 pixel border, though. Use with f.resize and bind it to a
# button in frame context.
#BorderResizeCursors
### 3D effect on titles. Uncomment to use.
#UseThreeDTitles
#TitleShadowDepth 1
#FramePadding 1 # Margin beetwen decorations and border in title.
### The window with focus gets a decoration in the title bar. The
### default is a stipple pattern which is a pain over VNC. Above I
### have asked to use a small solid bitmap instead. If you don't want
### any such highlight, uncomment this.
#NoTitleHighlight
# Mark focus with a sunken title bar if we have 3D titles.
#SunkFocusWindowTitle
### Uncomment for tight titles squeezed to the left side.
#SqueezeTitle
# Use no titles on windows whatsoever.
Notitle
### If we turn on titles above, dont draw a title bar on top of these
### windows.
Notitle
{
"WorkSpaceManager"
"dclock"
"xbiff"
"bbmail"
"xclock"
"xeyes"
"xmcbiff"
}
# Place windows with these names on the designated workspaces.
#Occupy
#{
# Workspace "3" {"foo"}
#}
### Put these windows on all workspaces.
OccupyAll
{
"WorkSpaceManager"
"dclock"
"xclock"
"rclock"
"xbiff"
"xmcbiff"
}
### No default buttons on title bar.
NoDefaults
### Functions
### Move current window to another workspace.
Function "toone"
{
f.addtoworkspace "1"
f.removefromworkspace "2"
f.removefromworkspace "3"
f.removefromworkspace "4"
f.removefromworkspace "5"
f.removefromworkspace "6"
f.removefromworkspace "7"
f.removefromworkspace "8"
f.removefromworkspace "9"
}
Function "totwo"
{
f.removefromworkspace "1"
f.addtoworkspace "2"
f.removefromworkspace "3"
f.removefromworkspace "4"
f.removefromworkspace "5"
f.removefromworkspace "6"
f.removefromworkspace "7"
f.removefromworkspace "8"
f.removefromworkspace "9"
}
Function "tothree"
{
f.removefromworkspace "1"
f.removefromworkspace "2"
f.addtoworkspace "3"
f.removefromworkspace "4"
f.removefromworkspace "5"
f.removefromworkspace "6"
f.removefromworkspace "7"
f.removefromworkspace "8"
f.removefromworkspace "9"
}
Function "tofour"
{
f.removefromworkspace "1"
f.removefromworkspace "2"
f.removefromworkspace "3"
f.addtoworkspace "4"
f.removefromworkspace "5"
f.removefromworkspace "6"
f.removefromworkspace "7"
f.removefromworkspace "8"
f.removefromworkspace "9"
}
Function "tofive"
{
f.removefromworkspace "1"
f.removefromworkspace "2"
f.removefromworkspace "3"
f.removefromworkspace "4"
f.addtoworkspace "5"
f.removefromworkspace "6"
f.removefromworkspace "7"
f.removefromworkspace "8"
f.removefromworkspace "9"
}
Function "tosix"
{
f.removefromworkspace "1"
f.removefromworkspace "2"
f.removefromworkspace "3"
f.removefromworkspace "4"
f.removefromworkspace "5"
f.addtoworkspace "6"
f.removefromworkspace "7"
f.removefromworkspace "8"
f.removefromworkspace "9"
}
Function "toseven"
{
f.removefromworkspace "1"
f.removefromworkspace "2"
f.removefromworkspace "3"
f.removefromworkspace "4"
f.removefromworkspace "5"
f.removefromworkspace "6"
f.addtoworkspace "7"
f.removefromworkspace "8"
f.removefromworkspace "9"
}
Function "toeight"
{
f.removefromworkspace "1"
f.removefromworkspace "2"
f.removefromworkspace "3"
f.removefromworkspace "4"
f.removefromworkspace "5"
f.removefromworkspace "6"
f.removefromworkspace "7"
f.addtoworkspace "8"
f.removefromworkspace "9"
}
Function "tonine"
{
f.removefromworkspace "1"
f.removefromworkspace "2"
f.removefromworkspace "3"
f.removefromworkspace "4"
f.removefromworkspace "5"
f.removefromworkspace "6"
f.removefromworkspace "7"
f.removefromworkspace "8"
f.addtoworkspace "9"
}
TitleButtonBorderWidth 0
ButtonIndent 0
TitleButtonShadowDepth 1
# Start resizing right away, even without crossing a border.
AutoRelativeResize
# When moving around windows, if we pass another window by this many
# pixels, moving is resumed.
MovePackResistance 20
### Mouse buttons
Button3 = : title : f.menu "programs"
Button1 = mod2 : window : f.movepack
Button2 = mod2 : window : f.raiselower
Button3 = mod2 : window : f.resize
### Move visible screen to a different workspaces with the Function
"1" = mod2 : all : f.gotoworkspace "1"
"2" = mod2 : all : f.gotoworkspace "2"
"3" = mod2 : all : f.gotoworkspace "3"
"4" = mod2 : all : f.gotoworkspace "4"
"5" = mod2 : all : f.gotoworkspace "5"
"6" = mod2 : all : f.gotoworkspace "6"
"7" = mod2 : all : f.gotoworkspace "7"
"8" = mod2 : all : f.gotoworkspace "8"
"9" = mod2 : all : f.gotoworkspace "9"
### Send windows to other workspaces.
"1" = mod2 | shift : all : f.function "toone"
"2" = mod2 | shift : all : f.function "totwo"
"3" = mod2 | shift : all : f.function "tothree"
"4" = mod2 | shift : all : f.function "tofour"
"5" = mod2 | shift : all : f.function "tofive"
"6" = mod2 | shift : all : f.function "tosix"
"7" = mod2 | shift : all : f.function "toseven"
"8" = mod2 | shift : all : f.function "toeight"
"9" = mod2 | shift : all : f.function "tonine"
### Occupy all workspaces. Doesn't toggle, I'm afraid.
"f" = mod2 : all : f.occupyall
### Move windows about with Alt + vi-like keys or arrow keys.
"Up" = mod2 : all : f.jumpup "20"
"Left" = mod2 : all : f.jumpleft "20"
"Right" = mod2 : all: f.jumpright "20"
"Down" = mod2 : all : f.jumpdown "20"
"i" = mod2 : all : f.jumpup "20"
"n" = mod2 : all : f.jumpleft "20"
"o" = mod2 : all: f.jumpright "20"
"e" = mod2 : all : f.jumpdown "20"
"Right" = mod2 | shift : all : f.changesize "right +10"
"Left" = mod2 | shift : all : f.changesize "right -10"
"Down" = mod2 | shift : all : f.changesize "bottom +10"
"Up" = mod2 | shift : all : f.changesize "bottom -10"
"o" = mod2 | shift : all : f.changesize "right +10"
"n" = mod2 | shift : all : f.changesize "right -10"
"e" = mod2 | shift : all : f.changesize "bottom +10"
"i" = mod2 | shift : all : f.changesize "bottom -10"
### Maximize windows
"m" = mod2 : all: f.zoom
"v" = mod2 : all : f.hzoom
"m" = mod2 | shift:all: f.fullzoom
### Kill a window.
"x" = mod2 : all: f.delete
### Program shortcuts.
"Return" = mod2 : all: f.exec "LANG=en_US.UTF-8;urxvt &"
### Restart the wm.
"r" = mod2: all: f.restart
# Move around.
"k" = mod2 : all : f.warpring "next"
"Tab" = mod2 : all : f.warpring "next"
### Some useful tools I often start.
menu "programs"
{
"Programs" f.title
"Lock" f.exec "slock"
"Terminal" f.exec "urxvt &"
"Terminal Gacha" f.exec "urxvt -fn '-bellcore-gacha-medium-r-normal--16-160-72-72-c-60-iso8859-1' &"
"Terminal 9x15" f.exec "urxvt -fn 9x15 &"
"Emacs" f.exec "emacs &"
"Firefox" f.exec "firefox&"
"Interface" f.title
"Screens" f.menu "screens"
"Keyboards" f.menu "keyboards"
}
# to add?
#second move/resize speed
#screen corner and center warping
#cursor warping?
#f.rightzoom
#f.leftzoom
#f.topzoom
#f.bottomzoom
#f.fill string
#Where string is either : oqrightcq, oqleftcq, oqtopcq, oqbottomcq or oqverticalcq. The current window is resized in the specified direction until it
#reaches an obstacle (either another window, or the screen border). f.fill oqverticalcq sets the window status to oqzoomedcq and toggles, ie calling it
#again will reset the previous window size.