Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

  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
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
#
# $NetBSD: system.ctwmrc,v 1.19 2022/05/27 17:04:16 nia Exp $
#
# ctwmrc by nia
#
# An attempt to strike a usability balance that makes keys and buttons
# do the thing users of various operating systems expect them to do.
#
# Most things should be possible to accomplish with only the keyboard.
#
# Also, mostly inoffensive colours (avoiding potentially inaccessible
# combinations like red-green).
#

# don't use the default buttons or key bindings, we define our own
NoDefaults

DontShowWelcomeWindow

ShowWorkSpaceManager
ShowIconManager

# 3D icon managers do not seemingly honor IconManagerHighlight,
# which makes them slightly less useful
#UseThreeDIconManagers
#UseThreeDWMap
UseThreeDBorders
#UseThreeDMenus
UseThreeDTitles

esyscmd(`printf "define(fontsize, %d)\n" "$(/usr/X11R7/libexec/ctwm_font_size)"')

ifelse(fontsize, `64', `
TitleFont        "-*-spleen-*-*-*-*-64-*-*-*-*-*-*-*"
MenuFont         "-*-spleen-*-*-*-*-64-*-*-*-*-*-*-*"
IconManagerFont  "-*-spleen-*-*-*-*-64-*-*-*-*-*-*-*"
IconFont         "-*-spleen-*-*-*-*-64-*-*-*-*-*-*-*"
ResizeFont       "-*-spleen-*-*-*-*-64-*-*-*-*-*-*-*"
WorkSpaceFont    "-*-spleen-*-*-*-*-32-*-*-*-*-*-*-*"
WorkSpaceManagerGeometry  "240x960-4-4" 1
IconManagerGeometry       "800x-1-1+0" 1
ThreeDBorderWidth         12
BorderWidth               12
define(setsizes, `yes')
')

ifelse(fontsize, `32', `
TitleFont        "-*-spleen-*-*-*-*-32-*-*-*-*-*-*-*"
MenuFont         "-*-spleen-*-*-*-*-32-*-*-*-*-*-*-*"
IconManagerFont  "-*-spleen-*-*-*-*-32-*-*-*-*-*-*-*"
IconFont         "-*-spleen-*-*-*-*-32-*-*-*-*-*-*-*"
ResizeFont       "-*-spleen-*-*-*-*-32-*-*-*-*-*-*-*"
WorkSpaceFont    "-*-spleen-*-*-*-*-24-*-*-*-*-*-*-*"
WorkSpaceManagerGeometry  "120x480-4-4" 1
IconManagerGeometry       "400x-1-1+0" 1
ThreeDBorderWidth         6
BorderWidth               6
define(setsizes, `yes')
')

ifelse(fontsize, `24', `
TitleFont        "-*-spleen-*-*-*-*-24-*-*-*-*-*-*-*"
MenuFont         "-*-spleen-*-*-*-*-24-*-*-*-*-*-*-*"
IconManagerFont  "-*-spleen-*-*-*-*-24-*-*-*-*-*-*-*"
IconFont         "-*-spleen-*-*-*-*-24-*-*-*-*-*-*-*"
ResizeFont       "-*-spleen-*-*-*-*-24-*-*-*-*-*-*-*"
WorkSpaceFont    "-*-spleen-*-*-*-*-16-*-*-*-*-*-*-*"
WorkSpaceManagerGeometry  "90x360-4-4" 1
IconManagerGeometry       "300x-1-1+0" 1
ThreeDBorderWidth         4
BorderWidth               4
define(setsizes, `yes')
')

ifelse(fontsize, `12', `
TitleFont        "-*-spleen-*-*-*-*-12-*-*-*-*-*-*-*"
MenuFont         "-*-spleen-*-*-*-*-12-*-*-*-*-*-*-*"
IconManagerFont  "-*-spleen-*-*-*-*-12-*-*-*-*-*-*-*"
IconFont         "-*-spleen-*-*-*-*-12-*-*-*-*-*-*-*"
ResizeFont       "-*-spleen-*-*-*-*-12-*-*-*-*-*-*-*"
WorkSpaceFont    "-*-spleen-*-*-*-*-8-*-*-*-*-*-*-*"
WorkSpaceManagerGeometry  "45x180-4-4" 1
IconManagerGeometry       "150x-1-1+0" 1
ThreeDBorderWidth         1
BorderWidth               1
define(setsizes, `yes')
')

# Fallback in case a valid font size was not returned.
# "Default case" is 16px.

ifdef(`setsizes', `', `
TitleFont        "-*-spleen-*-*-*-*-16-*-*-*-*-*-*-*"
MenuFont         "-*-spleen-*-*-*-*-16-*-*-*-*-*-*-*"
IconManagerFont  "-*-spleen-*-*-*-*-16-*-*-*-*-*-*-*"
IconFont         "-*-spleen-*-*-*-*-16-*-*-*-*-*-*-*"
ResizeFont       "-*-spleen-*-*-*-*-16-*-*-*-*-*-*-*"
WorkSpaceFont    "-*-spleen-*-*-*-*-12-*-*-*-*-*-*-*"
WorkSpaceManagerGeometry  "60x240-4-4" 1
IconManagerGeometry       "200x-1-1+0" 1
ThreeDBorderWidth         3
BorderWidth               3
')

RestartPreviousState

DecorateTransients

# allow the user to have their root window recolored as they choose
DontPaintRootWindow

# hide window contents while altering windows for performance
NoOpaqueMove
NoOpaqueResize

AutoOccupy
AutoRelativeResize

CenterFeedbackWindow

NoGrabServer

RaiseOnClick

DontMoveOff
MoveOffResistance	  150

ConstrainedMoveTime       0

IgnoreLockModifier

# Not actually that random.
# Means that windows do not have to be placed by hand with a mouse,
# which helps if you are using a keyboard only.
RandomPlacement          "on"

MoveDelta                 3
ClearShadowContrast       40
DarkShadowContrast        60
MovePackResistance        100

RaiseWhenAutoUnSqueeze
ShortAllWindowsMenus

#BeNiceToColorMap

NoStackMode

StayUpMenus
WarpToDefaultMenuEntry
MenuShadowDepth      1

# warp through all windows in the current workspace
WindowRing
WarpRingOnScreen

NoTitleHighlight

TitleButtonShadowDepth    1
TitleShadowDepth          1
TitleButtonBorderWidth    0
TitlePadding              0
TitleJustification        "left"
ButtonIndent              0
FramePadding		  0

LeftTitleButton           ":xpm:dot"      = f.menu "titleops"
RightTitleButton          ":xpm:resize"   = f.resize
RightTitleButton          ":xpm:cross"    = f.delete

BorderShadowDepth         2
BorderResizeCursors

MaxIconTitleWidth         120
NoIconManagerFocus
IconManagerShadowDepth    1
IconifyByUnmapping

ReallyMoveInWorkspaceManager
MapWindowCurrentWorkSpace {  "black" "firebrick" }
DontToggleWorkSpaceManagerState
DontWarpCursorInWMap
NoShowOccupyAll	
ReverseCurrentWorkspace	
StartInMapState
WMgrHorizButtonIndent     0
WMgrVertButtonIndent      0

WorkSpaces 
{
    "1"    { "lavender" "black" "darkslateblue" "white" }
    "2"    { "lavender" "black" "darkslateblue" "white" }
    "3"    { "lavender" "black" "darkslateblue" "white" }
    "4"    { "lavender" "black" "darkslateblue" "white" }
    "5"    { "lavender" "black" "darkslateblue" "white" }
}

Cursors
{
  Frame    "left_ptr"
  Title    "left_ptr"
  Icon     "left_ptr"
  IconMgr  "left_ptr"
  Move     "fleur"
  Resize   "fleur"
  Menu     "left_ptr"
  Button   "hand2"
  Wait     "watch"
  Select   "dot"
  Destroy  "pirate"
}

Color
{
  BorderColor           "firebrick"

  BorderTileBackground  "steelblue"
  BorderTileForeground  "steelblue"

  DefaultBackground     "grey70"
  DefaultForeground     "black"

  TitleBackground       "lavender"
  TitleForeground       "black" 

  MenuBackground        "lavender"
  MenuForeground        "black"
  MenuTitleBackground   "darkorange2"
  MenuTitleForeground   "black"
  MenuShadowColor 	"gray15"

  IconBackground        "black"
  IconForeground        "white"
  IconBorderColor       "gray45"

  IconManagerBackground "lavender"
  IconManagerForeground "black"
  IconManagerHighlight  "firebrick"

  MapWindowBackground   "lavender"
  MapWindowForeground   "black"	
}

Monochrome
{
    BorderColor 		"black"

    BorderTileForeground 	"black"
    BorderTileBackground 	"white"

    TitleForeground 		"black"
    TitleBackground 		"white"

    MenuForeground 		"black"
    MenuBackground 		"white"
    MenuTitleForeground 	"black"
    MenuTitleBackground 	"white"

    MapWindowForeground 	"white"
    MapWindowBackground 	"white"
}

syscmd(/usr/X11R7/libexec/ctwm_app_menu)

menu "appmenu"
{
    "pkgsrc Applications"	f.title
    " Accessories"		f.menu "Accessories"
    " Games"			f.menu "Games"
    " Graphics"			f.menu "Graphics"
    " Internet"			f.menu "Internet"
    " Multimedia"		f.menu "Multimedia"
    " Office"			f.menu "Office"
    " Programming"		f.menu "Programming"
    " System"			f.menu "System"
    " Misc"			f.menu "Misc"
}

menu "deskutils"
{
    "Desktop utilities"		f.title
    " Calculator"		!"xcalc &"
    " Text editor"		!"xedit &"
    ""				f.separator
    " XEyes"			!"xeyes &"
    " OpenGL Gears"		!"glxgears &"
    " Spinning cube"		!"ico -sleep 0.016 -obj cube -colors darkorange &"
    ""				f.separator
    " Compositor (shadows)"	!"pkill xcompmgr; xcompmgr -c &"
    " Compositor (simple)"	!"pkill xcompmgr; xcompmgr -n &"
    ""				f.separator
    " Magnify"			!"xmag -source 100x100 &"
    " Kill window"		!"xkill &"
}

menu "termutils"
{
    "Terminal utilities"	f.title
    ""				f.separator
    " VIsual Editor"		!"xterm -class UXTerm -e vi &"
    " Tetris"			!"xterm -class UXTerm -e tetris &"
    ""				f.separator
    " Audio mixer"		!"xterm -class UXTerm -e aiomixer &"
    ""				f.separator
    " Top processes"		!"xterm -class UXTerm -e top &"
    " I/O stats"		!"xterm -class UXTerm -e 'sysstat iostat' &"
    " Network stats"		!"xterm -class UXTerm -e 'sysstat ifstat' &"
    " Disk usage"		!"xterm -class UXTerm -e 'sysstat df' &"
}

menu "NetBSD"
{
    "NetBSD"			f.title
    ""				f.separator
    " Terminal"			!"uxterm &"
    ""				f.separator
    " Applications"		f.menu "appmenu"
    " Desktop utilities"	f.menu "deskutils"
    " Terminal utilities"	f.menu "termutils"
    ""				f.separator
    " Restart CTWM"		f.twmrc
    " Quit"			f.quit
}

menu "titleops"
{
    "Window"       f.title
    ""             f.separator
    " Iconify"     f.iconify
    " Resize"      f.resize
    " Move"        f.move
    ""             f.separator
    " Occupy ..."  f.occupy
    " Occupy All"  f.occupyall
    ""             f.separator
    " Raise"       f.raise
    " Lower"       f.lower
    ""             f.separator
    " Zoom"        f.fullzoom
    " Zoom-V"      f.zoom
    " Zoom-H"      f.horizoom
    ""             f.separator
    " Kill"        f.destroy
    " Close"       f.delete
}

IconManagerDontShow
{
} 

OccupyAll 
{
   "XClock"
   "xsm"
   "xconsole"
   "XVidCap"
}

AlwaysOnTop
{
   "XEyes"
   "XVidCap"
}

NoTitle 
{
   "TWM Icon Manager"
   "WorkSpaceManager"
   "XClock"
}

WindowRingExclude
{
   "TWM Icon Manager"
   "WorkSpaceManager"
   "XClock"
   "xsm"
   "xconsole"
}

StartIconified 
{ 
}

NoBorder
{
}

Function "raise-move"          { f.raise f.deltastop f.forcemove }
Function "raise-and-resize"    { f.raise f.deltastop f.resize }

# These are basically essential for basic functionality.

Button1 =	: title		: f.function "raise-move"
Button2 =	: title		: f.function "raise-and-resize"
Button3 =	: title | frame	: f.menu "titleops"

Button1 =	: frame		: f.function "raise-and-resize"

Button1 =	: icon | iconmgr	: f.iconify
Button2 =	: icon			: f.move
Button3 =	: icon | iconmgr	: f.raiselower

Button1 =	: root		: f.menu "NetBSD"
Button2 =	: root		: f.menu "TwmAllWindows"
Button3 =	: root		: f.menu "NetBSD"

#
# Mod1 is the "Alt/Meta" key.
# Mod4 is the "OS" key.
#

Button1 = mod1	: window	: f.forcemove
Button1 = mod4	: window	: f.forcemove
Button3 = mod1	: window 	: f.resize
Button3 = mod4	: window 	: f.resize

"Up"     = mod4           : all : f.upworkspace
"Down"   = mod4           : all : f.downworkspace
"Left"   = mod4           : all : f.prevworkspace
"Right"  = mod4           : all : f.nextworkspace

"Up"     = mod1 | control : all : f.upworkspace
"Down"   = mod1 | control : all : f.downworkspace
"Left"   = mod1 | control : all : f.prevworkspace
"Right"  = mod1 | control : all : f.nextworkspace

"1"      = mod1 | control : all : f.gotoworkspace "1"
"2"      = mod1 | control : all : f.gotoworkspace "2"
"3"      = mod1 | control : all : f.gotoworkspace "3"
"4"      = mod1 | control : all : f.gotoworkspace "4"
"5"      = mod1 | control : all : f.gotoworkspace "5"
"6"      = mod1 | control : all : f.gotoworkspace "6"
"7"      = mod1 | control : all : f.gotoworkspace "7"
"8"      = mod1 | control : all : f.gotoworkspace "8"
"9"      = mod1 | control : all : f.gotoworkspace "9"

"1"      = mod4 : all : f.gotoworkspace "1"
"2"      = mod4 : all : f.gotoworkspace "2"
"3"      = mod4 : all : f.gotoworkspace "3"
"4"      = mod4 : all : f.gotoworkspace "4"
"5"      = mod4 : all : f.gotoworkspace "5"
"6"      = mod4 : all : f.gotoworkspace "6"
"7"      = mod4 : all : f.gotoworkspace "7"
"8"      = mod4 : all : f.gotoworkspace "8"
"9"      = mod4 : all : f.gotoworkspace "9"

"XF86AudioRaiseVolume" = : all : !"mixerctl -w outputs.master+=5"
"XF86AudioLowerVolume" = : all : !"mixerctl -w outputs.master-=5"
#"XF86AudioMute"        = : all : !"mixerctl -w outputs.master=0"

#
# "Windows" style keyboard shortcuts
#

"Tab"    = mod1           : all : f.warpring "next"
"Tab"    = mod1 | s       : all : f.warpring "prev"
"Tab"    = mod4           : all : f.warpring "next"
"Tab"    = mod4 | s       : all : f.warpring "prev"
"space"  = mod1           : window : f.menu "titleops"
"F4"     = mod1           : window : f.delete

#
# "Mac" style keyboard shortcuts
#

"w"      = mod4           : window : f.delete
"m"      = mod4           : window : f.iconify

#
# "evilwm" style keyboard shortcuts
#

# it is useful to be able to spawn a terminal without clicking.
"Return" = mod1 | c : all : !"uxterm &"
"Return" = mod4 | s : all : !"uxterm &"

"slash"  = mod1 | c : all : f.menu "TwmAllWindows"
"slash"  = mod4 : all     : f.menu "TwmAllWindows"
"p"      = mod1 | c : all : f.menu "NetBSD"
"p"      = mod4 : all     : f.menu "NetBSD"

# vi-style directions
"j"      = mod1 | control : window : f.jumpdown "10"
"k"      = mod1 | control : window : f.jumpup "10"
"h"      = mod1 | control : window : f.jumpleft "10"
"l"      = mod1 | control : window : f.jumpright "10"

"j"      = mod4 : window : f.jumpdown "10"
"k"      = mod4 : window : f.jumpup "10"
"h"      = mod4 : window : f.jumpleft "10"
"l"      = mod4 : window : f.jumpright "10"

"j"      = mod4 | s : window : f.changesize "bottom +10"
"k"      = mod4 | s : window : f.changesize "bottom -10"
"h"      = mod4 | s : window : f.changesize "right -10"
"l"      = mod4 | s : window : f.changesize "right +10"

"j"      = mod1 | c | s : window : f.changesize "bottom +10"
"k"      = mod1 | c | s : window : f.changesize "bottom -10"
"h"      = mod1 | c | s : window : f.changesize "right -10"
"l"      = mod1 | c | s : window : f.changesize "right +10"