# FvwmScript-Clock # # displays a digital clock in a window intended to be swallowed by # FvwmButtons # # when started with the -twelve option, it will display the time in twelve # hour format # WindowTitle {FvwmScript-Clock} WindowSize 56 56 # the following should be commented out if the Calendar is used outside # of FvwmButtons WindowPosition 30000 30000 Init Begin Set $mode = (GetScriptArgument 1) If $mode == {-twelve} Then Set $time = (GetOutput {exec date -j '+%I:%M %p'} 1 -1) Else Set $time = (GetOutput {exec date -j '+%R'} 1 -1) ChangeTitle 1 $time End PeriodicTasks Begin If (RemainderOfDiv (GetTime) 60)==0 Then Begin If $mode == {-twelve} Then Set $time = (GetOutput {exec date -j '+%I:%M %p'} 1 -1) Else Set $time = (GetOutput {exec date -j '+%R'} 1 -1) ChangeTitle 1 $time End End Widget 1 Property Position 0 0 Size 56 56 Type ItemDraw Flags Center NoReliefString Title {Ij} Font "xft:sans-serif:size=12:weight=bold:encoding=iso8859-1:minspace=true" Main Case message of SingleClic : Begin End End