Debian Codegraph @

modules/FvwmScript/Scripts/FvwmScript-Date

raw
1 WindowTitle {Date}
2 WindowSize 360 330 # Size
3 WindowPosition 191 50 # Position
4 ForeColor {black}
5 BackColor {grey85}
6 ShadowColor {grey55}
7 HilightColor {grey100}
8 Font -adobe-helvetica-bold-r-*-*-12-*
9
10 Init
11 Begin
12 WarpPointer 1
13 Set $NHour=(GetOutput {date '+%d %m %Y %H %M'} 1 4)
14 ChangeValue 10 $NHour
15 ChangeTitle 8 $NHour
16
17 Set $NMinu=(GetOutput {date '+%d %m %Y %H %M'} 1 5)
18 ChangeValue 14 $NMinu
19 ChangeTitle 12 $NMinu
20
21 Set $Day=(GetOutput {date '+%d %m %Y %H %M'} 1 1)
22 ChangeValue 20 $Day
23 ChangeTitle 18 $Day
24
25 Set $Year=(GetOutput {date '+%d %m %Y %H %M'} 1 3)
26 ChangeValue 24 $Year
27 ChangeTitle 22 $Year
28
29 Set $Month=(GetOutput {date '+%d %m %Y %H %M'} 1 2)
30 ChangeValue 26 $Month
31
32 Set $MaxDay=31
33 Set $cmd={date --date '} $Month {/} $MaxDay {/} $Year {' +%d}
34 While (GetOutput $cmd 1 1)=={} Do
35 Begin
36 Set $MaxDay=(Add $MaxDay -1)
37 Set $cmd={date --date '} $Month {/} $MaxDay {/} $Year {' +%d}
38 End
39 ChangeMaxValue 20 $MaxDay
40
41 End
42
43 Widget 1
44 Property
45 Size 50 30
46 Position 190 280
47 Flags NoReliefString
48 Type PushButton
49 Title {OK}
50 Main
51 Case message of
52 SingleClic :
53 Begin
54 Do {Exec date -s '} $NHour {:} $NMinu { } $Month {/} $Day {/} $Year{'}
55 Quit
56 End
57 End
58
59 Widget 2
60 Property
61 Size 50 30
62 Position 280 280
63 Flags NoReliefString
64 Type PushButton
65 Title {Cancel}
66 Main
67 Case message of
68 SingleClic :
69 Begin
70 Do {Exec xset s } $TimeOut
71 Quit
72 End
73 End
74
75 Widget 3
76 Property
77 Size 340 130
78 Position 10 10
79 Type Rectangle
80 Main
81 Case message of
82 SingleClic :
83 Begin
84 End
85 End
86
87 Widget 4
88 Property
89 Position 15 2
90 Flags NoReliefString NoFocus
91 Type ItemDraw
92 Title {Time}
93 Main
94 Case message of
95 SingleClic :
96 Begin
97 End
98 End
99
100 Widget 5
101 Property
102 Size 80 80
103 Position 240 35
104 Flags NoReliefString
105 Type SwallowExec
106 Title {xclock}
107 SwallowExec {exec xclock -analog -padding 0 -geometry 70x56-1500-1500 -fg MidnightBlue -hd Blue -hl Blue -bg Grey85 -update 1 &}
108 Main
109 Case message of
110 SingleClic :
111 Begin
112 End
113 End
114
115 Widget 6
116 Property
117 Size 100 100
118 Position 230 25
119 Type Rectangle
120 Main
121 Case message of
122 SingleClic :
123 Begin
124 End
125 End
126
127 Widget 7
128 Property
129 Position 35 40
130 Flags NoReliefString NoFocus
131 Type ItemDraw
132 Title {Hours:}
133 Main
134 Case message of
135 SingleClic :
136 Begin
137 End
138 End
139
140 Widget 8
141 Property
142 Position 100 40
143 Flags NoReliefString NoFocus
144 Type ItemDraw
145 Title {00}
146 Main
147 Case message of
148 SingleClic :
149 Begin
150 End
151 End
152
153 Widget 9
154 Property
155 Size 26 26
156 Position 95 35
157 Type Rectangle
158 Main
159 Case message of
160 SingleClic :
161 Begin
162 End
163 End
164
165 Widget 10
166 Property
167 Position 125 32
168 Flags NoReliefString
169 Type MiniScroll
170 Value 15
171 MaxValue 23
172 MinValue 0
173 Main
174 Case message of
175 SingleClic :
176 Begin
177 Set $NHour=(GetValue 10)
178 If $NHour<10 Then
179 Set $NHour=0 $NHour
180 ChangeTitle 8 $NHour
181 End
182 End
183
184 Widget 11
185 Property
186 Position 35 90
187 Flags NoReliefString NoFocus
188 Type ItemDraw
189 Title {Minutes:}
190 Main
191 Case message of
192 SingleClic :
193 Begin
194 End
195 End
196
197 Widget 12
198 Property
199 Position 100 90
200 Flags NoReliefString NoFocus
201 Type ItemDraw
202 Title {00}
203 Main
204 Case message of
205 SingleClic :
206 Begin
207 End
208 End
209
210 Widget 13
211 Property
212 Size 26 26
213 Position 95 85
214 Type Rectangle
215 Main
216 Case message of
217 SingleClic :
218 Begin
219 End
220 End
221
222 Widget 14
223 Property
224 Position 125 82
225 Flags NoReliefString
226 Type MiniScroll
227 Value 15
228 MaxValue 59
229 MinValue 0
230 Main
231 Case message of
232 SingleClic :
233 Begin
234 Set $NMinu=(GetValue 14)
235 If $NMinu<10 Then
236 Set $NMinu=0 $NMinu
237 ChangeTitle 12 $NMinu
238 End
239 End
240
241 Widget 15
242 Property
243 Size 340 110
244 Position 10 155
245 Flags NoReliefString
246 Type Rectangle
247 Main
248 Case message of
249 SingleClic :
250 Begin
251 End
252 End
253
254 Widget 16
255 Property
256 Position 15 147
257 Flags NoReliefString NoFocus
258 Type ItemDraw
259 Title {Date}
260 Main
261 Case message of
262 SingleClic :
263 Begin
264 End
265 End
266
267 Widget 17
268 Property
269 Position 30 180
270 Flags NoReliefString
271 Type ItemDraw
272 Title {Day:}
273 Main
274 Case message of
275 SingleClic :
276 Begin
277 End
278 End
279
280 Widget 18
281 Property
282 Position 80 180
283 Flags NoReliefString
284 Type ItemDraw
285 Title {00}
286 Main
287 Case message of
288 SingleClic :
289 Begin
290 End
291 End
292
293 Widget 19
294 Property
295 Size 26 26
296 Position 75 175
297 Type Rectangle
298 Main
299 Case message of
300 SingleClic :
301 Begin
302 End
303 End
304
305 Widget 20
306 Property
307 Position 105 172
308 Flags NoReliefString
309 Type MiniScroll
310 Value 1
311 MaxValue 1
312 MinValue 1
313 Main
314 Case message of
315 SingleClic :
316 Begin
317 Set $Day=(GetValue 20)
318 If $Day<10 Then
319 Set $Day=0 $Day
320 ChangeTitle 18 $Day
321 End
322 End
323
324 Widget 21
325 Property
326 Position 200 180
327 Flags NoReliefString
328 Type ItemDraw
329 Title {Year:}
330 Main
331 Case message of
332 SingleClic :
333 Begin
334 End
335 End
336
337 Widget 22
338 Property
339 Position 250 180
340 Flags NoReliefString
341 Type ItemDraw
342 Title {2001}
343 Main
344 Case message of
345 SingleClic :
346 Begin
347 End
348 End
349
350 Widget 23
351 Property
352 Size 41 26
353 Position 245 175
354 Type Rectangle
355 Main
356 Case message of
357 SingleClic :
358 Begin
359 End
360 End
361
362 Widget 24
363 Property
364 Position 290 172
365 Flags NoReliefString
366 Type MiniScroll
367 Value 1996
368 MaxValue 2037
369 MinValue 1970
370 Main
371 Case message of
372 SingleClic :
373 Begin
374 Set $Year=(GetValue 24)
375 ChangeTitle 22 $Year
376 Set $MaxDay=31
377 Set $cmd={date --date '} $Month {/} $MaxDay {/} $Year {' +%d}
378 While (GetOutput $cmd 1 1)=={} Do
379 Begin
380 Set $MaxDay=(Add $MaxDay -1)
381 Set $cmd={date --date '} $Month {/} $MaxDay {/} $Year {' +%d}
382 End
383 ChangeMaxValue 20 $MaxDay
384 Set $Day=(GetValue 20)
385 If $Day<10 Then
386 Set $Day=0 $Day
387 ChangeTitle 18 $Day
388 End
389 End
390
391 Widget 25
392 Property
393 Position 30 225
394 Flags NoReliefString
395 Type ItemDraw
396 Title {Month:}
397 Main
398 Case message of
399 SingleClic :
400 Begin
401 End
402 End
403
404 Widget 26
405 Property
406 Position 100 220
407 Flags NoReliefString
408 Type PopupMenu
409 Title {January|February|March|April|May|June|July|August|September|October|November|December}
410 Main
411 Case message of
412 SingleClic :
413 Begin
414 Set $Month=(GetValue 26)
415 If $Month<10 Then
416 Set $Month=0 $Month
417 Set $MaxDay=31
418 Set $cmd={date --date '} $Month {/} $MaxDay {/} $Year {' +%d}
419 While (GetOutput $cmd 1 1)=={} Do
420 Begin
421 Set $MaxDay=(Add $MaxDay -1)
422 Set $cmd={date --date '} $Month {/} $MaxDay {/} $Year {' +%d}
423 End
424 ChangeMaxValue 20 $MaxDay
425 Set $Day=(GetValue 20)
426 If $Day<10 Then
427 Set $Day=0 $Day
428 ChangeTitle 18 $Day
429 End
430 End
431
432
433
434
435
436