author | Claus Gittinger <cg@exept.de> |
Thu, 07 Nov 1996 16:40:15 +0100 | |
changeset 166 | 1d262259df3d |
parent 161 | 4a5bc7860889 |
child 167 | b1b75bc122f3 |
permissions | -rw-r--r-- |
4 | 1 |
"* |
2 |
* $Header$ |
|
3 |
* |
|
4 |
* sample private.rc - file |
|
5 |
* |
|
52 | 6 |
* a copy of this file can (should) reside in $home/.smalltalk/private.rc or |
7 |
* in the current directory - put all private preferences in here. |
|
41 | 8 |
* |
9 |
* |
|
25 | 10 |
* notice, you will find some things enclosed in |
143
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
11 |
* ... claus ifTrue:[ |
25 | 12 |
* |
143
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
13 |
* these are my personal preferences which will be |
25 | 14 |
* ignored in your environment, but are taken in mine. |
15 |
* That way, I dont have to maintain two different 'private.rc' files. |
|
143
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
16 |
* (you may want to have a look into it - some is of general interest) |
4 | 17 |
*" |
18 |
||
25 | 19 |
"/ |
143
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
20 |
"/ If local sources have preference over source code managment |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
21 |
"/ |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
22 |
"/Class tryLocalSourceFirst:true. |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
23 |
|
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
24 |
"/ |
26 | 25 |
"/ I want the hostname to be prepended to a windows label |
26 |
"/ |
|
27 |
StandardSystemView includeHostNameInLabel:true. |
|
28 |
||
29 |
"/ |
|
25 | 30 |
"/ this turns off error/fatal messages from the VM |
31 |
"/ (it does not really make sense to turn them off) |
|
32 |
"/ |
|
33 |
"/ Smalltalk debugPrinting:false. |
|
34 |
||
35 |
"/ |
|
36 |
"/ set the package for fileIns done below |
|
37 |
"/ |
|
24 | 38 |
Project notNil ifTrue:[ |
39 |
Project setDefaultProject. |
|
25 | 40 |
Project current packageName:#'goody-fileIn'. |
24 | 41 |
]. |
42 |
! |
|
43 |
||
166 | 44 |
|whoAmI thisIsMySystem conf systemType| |
91 | 45 |
|
123
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
46 |
'reading keyboard.rc ...' infoPrintCR. |
41 | 47 |
Smalltalk fileIn:'keyboard.rc'. |
26 | 48 |
|
49 |
"/ |
|
50 |
"/ no matter what the 'display.rc' says: |
|
51 |
"/ I want my #iris style ... |
|
52 |
"/ |
|
77 | 53 |
View defaultStyle:#iris. |
54 |
"/ View defaultStyle:#motif. |
|
25 | 55 |
|
104 | 56 |
|
57 |
||
25 | 58 |
"/ add my private directories to the searchPath ... |
59 |
"/ This does not make sense in your environment. |
|
60 |
"/ However, I leave the code here to show how its done. |
|
61 |
"/ |
|
24 | 62 |
Smalltalk systemPath addFirst:'../..'. |
63 |
||
91 | 64 |
whoAmI := OperatingSystem getLoginName. |
152 | 65 |
thisIsMySystem := whoAmI = 'claus' or:[whoAmI = 'cg']. |
91 | 66 |
|
152 | 67 |
thisIsMySystem ifTrue:[ |
161 | 68 |
MenuView defaultFont:(MenuView defaultFont size:10). |
69 |
||
26 | 70 |
Smalltalk systemPath addFirst:'../../not_delivered'. |
71 |
Smalltalk systemPath addFirst:'../../private_classes'. |
|
72 |
Smalltalk systemPath addFirst:'../../fileIn/not_delivered'. |
|
25 | 73 |
Smalltalk systemPath addFirst:'../../libpro'. |
16 | 74 |
]. |
25 | 75 |
|
76 |
"/ since smalltalk keeps track of which directories exist |
|
77 |
"/ in the path, this cache has to be flushed whenever new directories |
|
78 |
"/ are added to the path: |
|
79 |
"/ |
|
24 | 80 |
Smalltalk flushPathCaches. |
16 | 81 |
|
25 | 82 |
"/ |
83 |
"/ color allocation strategy: |
|
84 |
"/ |
|
85 |
"/ the default is to allocate from the colormap as required. |
|
86 |
"/ As long as the number of distinct colors used is less than the number |
|
87 |
"/ of available colors (which is usually the case) this leads to better looking |
|
88 |
"/ images. |
|
89 |
"/ However, if many images are to be displayed simulatiously, images displayed |
|
90 |
"/ first may steal too many colors required in images displayed later. |
|
91 |
"/ In this case, it is better to preallocate some colors, and dither all images |
|
92 |
"/ using theese. Of course, while making the worst case better, this makes |
|
93 |
"/ the best case worse. You can decide ... |
|
94 |
"/ |
|
10 | 95 |
"/ Color getColors6x6x4. |
96 |
||
97 |
||
152 | 98 |
"/ The following enables some nice cursors; for example thumbsUp and thumbsDown |
25 | 99 |
"/ |
100 |
"/ claus: |
|
101 |
"/ I like those fancy cursors :-) |
|
102 |
"/ if you think this is too 'childish', remove the line below ... |
|
103 |
"/ |
|
123
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
104 |
"/ 'loading fancy cursors ...' infoPrintCR. |
118 | 105 |
Cursor initializeNewCursors. |
10 | 106 |
|
25 | 107 |
|
108 |
"/ claus: |
|
26 | 109 |
"/ The history manager automatically adds a history line to changed |
110 |
"/ methods and optionally to a classes history method. |
|
111 |
"/ |
|
152 | 112 |
thisIsMySystem ifTrue:[ |
26 | 113 |
HistoryManager notNil ifTrue:[ |
123
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
114 |
'activating HistoryManager ...' infoPrintCR. |
26 | 115 |
HistoryManager activate. |
116 |
] |
|
7 | 117 |
]. |
41 | 118 |
|
119 |
"/ claus: |
|
120 |
"/ I dont want those warnings about stx features being non-portable ... |
|
121 |
"/ However, you should (at least when new to the system) see them. |
|
122 |
"/ Once you get bored about them, make the below unconditional. |
|
152 | 123 |
"/ (you can also turn them off in the Launchers settings menu ...) |
41 | 124 |
"/ |
26 | 125 |
Compiler allowUnderscoreInIdentifier:true. |
126 |
Compiler warnUnderscoreInIdentifier:false. |
|
141 | 127 |
Compiler warnSTXSpecials:false. |
10 | 128 |
|
25 | 129 |
|
130 |
"/ this is a temporary kludge: specify the flags to be used |
|
131 |
"/ when compiling via stc. Primitive compilation (from within the browser) |
|
132 |
"/ is still experimental. So you better not care (yet) |
|
152 | 133 |
"/ BTW: its only supported on ELF systems and Linux - anyway |
25 | 134 |
"/ (and not in the free demo release). |
135 |
"/ |
|
166 | 136 |
conf := Smalltalk configuration. |
137 |
(conf includesString:'gcc') ifTrue:[ |
|
138 |
Compiler ccPath:'gcc' |
|
139 |
] ifFalse:[ |
|
140 |
Compiler ccPath:'cc' |
|
141 |
]. |
|
142 |
||
25 | 143 |
Compiler stcCompilation:#default. |
166 | 144 |
Compiler stcCompilationOptions:'+optinline +inlineNew'. |
145 |
||
146 |
"/ special options req'd for some systems (should be done in the host file ...) |
|
152 | 147 |
|
166 | 148 |
systemType := OperatingSystem getOSType. |
149 |
||
150 |
systemType = 'irix' ifTrue:[ |
|
152 | 151 |
Compiler stcCompilationIncludes:'-I../../include'. |
26 | 152 |
Compiler stcCompilationDefines:'-DGLX'. |
10 | 153 |
] ifFalse:[ |
152 | 154 |
Compiler stcCompilationIncludes:'-I../../include -I../../support/VGL/vogl/src'. |
26 | 155 |
Compiler stcCompilationDefines:'-DVGL'. |
156 |
||
152 | 157 |
"/ specify additional link libraries. |
158 |
"/ Disabled; thats the default anyway .... |
|
159 |
"/ |
|
160 |
"/ OperatingSystem getOSType = 'linux' ifTrue:[ |
|
161 |
"/ ObjectFileLoader searchedLibraries:#('/usr/lib/libc.a') |
|
162 |
"/ ] |
|
26 | 163 |
|
25 | 164 |
]. |
7 | 165 |
|
166 | 166 |
Compiler ccCompilationOptions:'-O'. |
167 |
||
168 |
systemType = 'solaris' ifTrue:[ |
|
169 |
Compiler ccCompilationOptions:'-O -fPIC' |
|
170 |
]. |
|
171 |
||
25 | 172 |
"/ experimental: try to always keep some bytes in the pocket |
64 | 173 |
"/ this changes the memory policy, to start the background collector whenever |
25 | 174 |
"/ freespace drops below 250k or 500k have been allocated since the last GC. |
175 |
"/ AND to allocate more memory, if (after the collect) less than 1Mb is free. |
|
176 |
"/ Doing so makes the system behave better if lots of memory is required |
|
64 | 177 |
"/ for short periods of time, since it prepares itself for that situation |
25 | 178 |
"/ during idle time. (I often walk around in the fileBrowser, loading big |
179 |
"/ files like XWorkstation.st or SystemBrowser.st ....) |
|
180 |
"/ |
|
26 | 181 |
ObjectMemory freeSpaceGCAmount:1000000. |
182 |
ObjectMemory freeSpaceGCLimit:250000. |
|
183 |
ObjectMemory incrementalGCLimit:500000. |
|
184 |
ObjectMemory startBackgroundCollectorAt:5. |
|
185 |
ObjectMemory startBackgroundFinalizationAt:5. |
|
25 | 186 |
|
187 |
"/ experimental: configure the memory manager to quickly increase |
|
188 |
"/ its oldSpace, as long as it stays below 8Mb (i.e. do not enter |
|
189 |
"/ a blocking mark&sweep or compress, but go straight ahead increasing |
|
190 |
"/ the oldSpace). Above that, behave as usual, i.e. try a GC first, |
|
191 |
"/ then increase the oldSpace size if that did not help. |
|
192 |
"/ If you have a machine with lots of (real) memory, you may want to |
|
193 |
"/ increase the number. The value below should be ok for 16-32Mb machines. |
|
194 |
"/ |
|
26 | 195 |
ObjectMemory fastMoreOldSpaceLimit:8*1024*1024. |
196 |
ObjectMemory fastMoreOldSpaceAllocation:true. |
|
16 | 197 |
! |
198 |
||
25 | 199 |
"/ another experimental (and a secret for now, since I dont want |
200 |
"/ you to play with those ;-) |
|
201 |
"/ For now, this is experimental. Once the best numbers |
|
202 |
"/ have been found, I'll hardwire them and document it ... |
|
203 |
||
8 | 204 |
|a| |
205 |
ObjectMemory newSpaceSize > (500*1024) ifTrue:[ |
|
206 |
a := #(nil nil nil nil -16 -4 -2 -2 0 0 16 nil) copy. |
|
207 |
] ifFalse:[ |
|
17 | 208 |
"/ min max cpy /32 /16 /8 /4 /2 /4 /8 /16 /32 " |
25 | 209 |
"/ |
210 |
"/ slow tenure - keeps objects longer in newSpace, |
|
211 |
"/ producing more scavenge overhead, but releasing IGC somewhat |
|
212 |
"/ |
|
17 | 213 |
"/ a := #(nil nil nil -100 -8 -4 -1 1 2 4 8 16 nil) copy. |
214 |
"/ a := #(nil nil nil nil -16 -4 0 0 0 4 16 nil) copy. |
|
25 | 215 |
|
17 | 216 |
"fast tenure" |
25 | 217 |
"/ |
218 |
"/ fast tenure - moves objects earlier into oldSpace, |
|
219 |
"/ releasing newSpace collector; however, the oldSpace IGC |
|
220 |
"/ may have more work to do. |
|
221 |
"/ |
|
16 | 222 |
a := #(nil nil nil nil -20 -8 -3 -1 -1 1 16 nil) copy. |
8 | 223 |
]. |
224 |
ObjectMemory tenureParameters:a. |
|
25 | 225 |
|
226 |
||
227 |
"/ set the package back to some useful default for programming |
|
228 |
"/ this is the package token assigned (by default) to all new methods/classes |
|
229 |
"/ (so you can use a browser on package=#private to find all of your new |
|
230 |
"/ stuff easily. (the conditional on Project being nonNil is for stripped down |
|
231 |
"/ systems without a Project class) |
|
232 |
||
233 |
Project notNil ifTrue:[ |
|
234 |
Project setDefaultProject. |
|
235 |
Project current packageName:#'private'. |
|
236 |
]. |
|
8 | 237 |
! |
123
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
238 |
|
126 | 239 |
(Smalltalk commandLine includes:'-q') ifFalse:[ |
123
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
240 |
"/ |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
241 |
"/ this turns off/on information messages from classes |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
242 |
"/ (such as 'D8IMAGE: allocating colors ...' |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
243 |
"/ |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
244 |
"/ Object infoPrinting:false. |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
245 |
Object infoPrinting:true. |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
246 |
|
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
247 |
"/ |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
248 |
"/ this turns off/on information messages from the VM |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
249 |
"/ (such as 'MEM: chitty chatty ...' |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
250 |
"/ |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
251 |
"/ ObjectMemory infoPrinting:false. |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
252 |
ObjectMemory infoPrinting:true. |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
253 |
]. |
143
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
254 |
|
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
255 |
Smalltalk addStartBlock:[ |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
256 |
"/ |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
257 |
"/ start some views ... |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
258 |
"/ you can add all stuff you'd like to come up by default |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
259 |
"/ the first time. |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
260 |
"/ |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
261 |
|
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
262 |
'starting main-menu ...' infoPrintCR. |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
263 |
Launcher open |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
264 |
|
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
265 |
"/ |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
266 |
"/ start a SystemBrowser |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
267 |
"/ - I dont want one (using Launcher) |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
268 |
"/ |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
269 |
"/ SystemBrowser open. |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
270 |
|
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
271 |
"/ |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
272 |
"/ start a FileBrowser |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
273 |
"/ - I dont want one (using Launcher) |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
274 |
"/ |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
275 |
"/ FileBrowser open. |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
276 |
|
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
277 |
"/ |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
278 |
"/ start a Workspace |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
279 |
"/ - I dont want one (using Launcher) |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
280 |
"/ |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
281 |
"/ Workspace open. |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
282 |
]. |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
283 |
|
123
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
284 |
! |