| 1 |
WindowTitle {FvwmScript-Clock-small_date} |
| 2 |
WindowSize 114 20 |
| 3 |
Font "xft:Verdana:pixelsize=12:Bold" |
| 4 |
Colorset 12 |
| 5 |
|
| 6 |
Init |
| 7 |
Begin |
| 8 |
If (GetOutput {date "+%p"} 1 -1)=={} Then |
| 9 |
Begin |
| 10 |
Set $mode={24} |
| 11 |
Set $timecmd={date "+%a %e, %R"} |
| 12 |
End |
| 13 |
Else |
| 14 |
Begin |
| 15 |
Set $mode={12} |
| 16 |
Set $timecmd={LC_TIME=C date "+%a %e, %I:%M %p"} |
| 17 |
End |
| 18 |
|
| 19 |
ChangeTitle 1 (GetOutput $timecmd 1 -1) |
| 20 |
End |
| 21 |
|
| 22 |
PeriodicTasks |
| 23 |
Begin |
| 24 |
If (RemainderOfDiv (GetTime) 60)==0 Then |
| 25 |
ChangeTitle 1 (GetOutput $timecmd 1 -1) |
| 26 |
End |
| 27 |
|
| 28 |
Widget 1 |
| 29 |
Property |
| 30 |
Position 0 -3 |
| 31 |
Size 114 20 |
| 32 |
Type ItemDraw |
| 33 |
Flags NoReliefString |
| 34 |
Title {} |
| 35 |
Colorset 12 |
| 36 |
Main |
| 37 |
Case message of |
| 38 |
SingleClic : |
| 39 |
Begin |
| 40 |
If $mode=={24} Then |
| 41 |
Begin |
| 42 |
Set $mode={12} |
| 43 |
Set $timecmd={LC_TIME=C date "+%a %e, %I:%M %p"} |
| 44 |
End |
| 45 |
Else |
| 46 |
Begin |
| 47 |
Set $mode={24} |
| 48 |
Set $timecmd={date "+%a %e, %R"} |
| 49 |
End |
| 50 |
ChangeTitle 1 (GetOutput $timecmd 1 -1) |
| 51 |
End |
| 52 |
End |