author | Claus Gittinger <cg@exept.de> |
Thu, 24 Oct 1996 17:02:41 +0200 | |
changeset 161 | 4a5bc7860889 |
parent 152 | 956f80caf731 |
child 166 | 1d262259df3d |
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 |
||
152 | 44 |
|whoAmI thisIsMySystem| |
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 |
"/ |
|
136 |
Compiler stcCompilation:#default. |
|
152 | 137 |
Compiler stcCompilationOptions:'+optinline +inlineNew -O'. |
138 |
||
10 | 139 |
OperatingSystem getOSType = 'irix' ifTrue:[ |
152 | 140 |
Compiler stcCompilationIncludes:'-I../../include'. |
26 | 141 |
Compiler stcCompilationDefines:'-DGLX'. |
10 | 142 |
] ifFalse:[ |
152 | 143 |
Compiler stcCompilationIncludes:'-I../../include -I../../support/VGL/vogl/src'. |
26 | 144 |
Compiler stcCompilationDefines:'-DVGL'. |
145 |
||
152 | 146 |
"/ specify additional link libraries. |
147 |
"/ Disabled; thats the default anyway .... |
|
148 |
"/ |
|
149 |
"/ OperatingSystem getOSType = 'linux' ifTrue:[ |
|
150 |
"/ ObjectFileLoader searchedLibraries:#('/usr/lib/libc.a') |
|
151 |
"/ ] |
|
26 | 152 |
|
25 | 153 |
]. |
7 | 154 |
|
25 | 155 |
"/ experimental: try to always keep some bytes in the pocket |
64 | 156 |
"/ this changes the memory policy, to start the background collector whenever |
25 | 157 |
"/ freespace drops below 250k or 500k have been allocated since the last GC. |
158 |
"/ AND to allocate more memory, if (after the collect) less than 1Mb is free. |
|
159 |
"/ Doing so makes the system behave better if lots of memory is required |
|
64 | 160 |
"/ for short periods of time, since it prepares itself for that situation |
25 | 161 |
"/ during idle time. (I often walk around in the fileBrowser, loading big |
162 |
"/ files like XWorkstation.st or SystemBrowser.st ....) |
|
163 |
"/ |
|
26 | 164 |
ObjectMemory freeSpaceGCAmount:1000000. |
165 |
ObjectMemory freeSpaceGCLimit:250000. |
|
166 |
ObjectMemory incrementalGCLimit:500000. |
|
167 |
ObjectMemory startBackgroundCollectorAt:5. |
|
168 |
ObjectMemory startBackgroundFinalizationAt:5. |
|
25 | 169 |
|
170 |
"/ experimental: configure the memory manager to quickly increase |
|
171 |
"/ its oldSpace, as long as it stays below 8Mb (i.e. do not enter |
|
172 |
"/ a blocking mark&sweep or compress, but go straight ahead increasing |
|
173 |
"/ the oldSpace). Above that, behave as usual, i.e. try a GC first, |
|
174 |
"/ then increase the oldSpace size if that did not help. |
|
175 |
"/ If you have a machine with lots of (real) memory, you may want to |
|
176 |
"/ increase the number. The value below should be ok for 16-32Mb machines. |
|
177 |
"/ |
|
26 | 178 |
ObjectMemory fastMoreOldSpaceLimit:8*1024*1024. |
179 |
ObjectMemory fastMoreOldSpaceAllocation:true. |
|
16 | 180 |
! |
181 |
||
25 | 182 |
"/ another experimental (and a secret for now, since I dont want |
183 |
"/ you to play with those ;-) |
|
184 |
"/ For now, this is experimental. Once the best numbers |
|
185 |
"/ have been found, I'll hardwire them and document it ... |
|
186 |
||
8 | 187 |
|a| |
188 |
ObjectMemory newSpaceSize > (500*1024) ifTrue:[ |
|
189 |
a := #(nil nil nil nil -16 -4 -2 -2 0 0 16 nil) copy. |
|
190 |
] ifFalse:[ |
|
17 | 191 |
"/ min max cpy /32 /16 /8 /4 /2 /4 /8 /16 /32 " |
25 | 192 |
"/ |
193 |
"/ slow tenure - keeps objects longer in newSpace, |
|
194 |
"/ producing more scavenge overhead, but releasing IGC somewhat |
|
195 |
"/ |
|
17 | 196 |
"/ a := #(nil nil nil -100 -8 -4 -1 1 2 4 8 16 nil) copy. |
197 |
"/ a := #(nil nil nil nil -16 -4 0 0 0 4 16 nil) copy. |
|
25 | 198 |
|
17 | 199 |
"fast tenure" |
25 | 200 |
"/ |
201 |
"/ fast tenure - moves objects earlier into oldSpace, |
|
202 |
"/ releasing newSpace collector; however, the oldSpace IGC |
|
203 |
"/ may have more work to do. |
|
204 |
"/ |
|
16 | 205 |
a := #(nil nil nil nil -20 -8 -3 -1 -1 1 16 nil) copy. |
8 | 206 |
]. |
207 |
ObjectMemory tenureParameters:a. |
|
25 | 208 |
|
209 |
||
210 |
"/ set the package back to some useful default for programming |
|
211 |
"/ this is the package token assigned (by default) to all new methods/classes |
|
212 |
"/ (so you can use a browser on package=#private to find all of your new |
|
213 |
"/ stuff easily. (the conditional on Project being nonNil is for stripped down |
|
214 |
"/ systems without a Project class) |
|
215 |
||
216 |
Project notNil ifTrue:[ |
|
217 |
Project setDefaultProject. |
|
218 |
Project current packageName:#'private'. |
|
219 |
]. |
|
8 | 220 |
! |
123
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
221 |
|
126 | 222 |
(Smalltalk commandLine includes:'-q') ifFalse:[ |
123
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
223 |
"/ |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
224 |
"/ this turns off/on information messages from classes |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
225 |
"/ (such as 'D8IMAGE: allocating colors ...' |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
226 |
"/ |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
227 |
"/ Object infoPrinting:false. |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
228 |
Object infoPrinting:true. |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
229 |
|
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
230 |
"/ |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
231 |
"/ this turns off/on information messages from the VM |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
232 |
"/ (such as 'MEM: chitty chatty ...' |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
233 |
"/ |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
234 |
"/ ObjectMemory infoPrinting:false. |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
235 |
ObjectMemory infoPrinting:true. |
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
236 |
]. |
143
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
237 |
|
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
238 |
Smalltalk addStartBlock:[ |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
239 |
"/ |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
240 |
"/ start some views ... |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
241 |
"/ 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
|
242 |
"/ the first time. |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
243 |
"/ |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
244 |
|
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
245 |
'starting main-menu ...' infoPrintCR. |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
246 |
Launcher open |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
247 |
|
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
248 |
"/ |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
249 |
"/ start a SystemBrowser |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
250 |
"/ - I dont want one (using Launcher) |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
251 |
"/ |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
252 |
"/ SystemBrowser open. |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
253 |
|
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 |
"/ start a FileBrowser |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
256 |
"/ - I dont want one (using Launcher) |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
257 |
"/ |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
258 |
"/ FileBrowser open. |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
259 |
|
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 |
"/ start a Workspace |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
262 |
"/ - I dont want one (using Launcher) |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
263 |
"/ |
71dc5ec7ef26
Renamed NewLauncher to Launcher.
Stefan Vogel <sv@exept.de>
parents:
141
diff
changeset
|
264 |
"/ Workspace open. |
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 |
|
123
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
118
diff
changeset
|
267 |
! |