Hello everyone
I try to have a script showing me the time, laid over the background, conky style.
I’d wish to use my desktop mouse binding over the area where the clock shows as well, so I of course need to replicate them there, but somehow it doesn’t work.
My first approach was to create a FvwmButton window, put the script inside it, and bind the buttons. Here is the code:
*FvwmDeskButtons: (1x1, Frame 0, ActiveColorset 9, Swallow FvwmDesktopClock `FvwmScript $[FVWM_USERDIR]/scripts/DesktopClock 14`, Action (Mouse 1) Menu MenuFvwmRoot Nop, Action (Mouse 2) Menu MenuFvwmRoot Nop, Action (Mouse 3) Menu MenuFvwmRoot Nop, Action (Mouse 6) FuncPrevPage, Action (Mouse 7) FuncNextPage)
The Buttons do load, and the clock is shown, but the defined actions don’t fire, as if I had bound them with “ActionIgnoresClientWindow”, which I obviously haven’t.
My next try would be to make the window borderless and lower it to the lowest layer, and bind the mouse buttons (1, 2 and 3 for the rootmenu, 6 and 7 for desktop switching) directly to the script. I know of
Case message of
SingleClic :
But this binds only one mouse button. Would there be either a way to make the FvwmButtons work out, or to bind buttons 2 to 7 in the script?
Here’s the script for comparison (nothing fancy, just one text widget showing the time ):
[code]WindowTitle {FvwmDesktopClock}
WindowSize 480 210
Font “Shadow=1 C:xft:GeosansLight:style=Regular:size=120”
Init
Begin
Set $MainColorset=(GetScriptArgument 1)
If $MainColorset <> {} Then
Begin
ChangeColorset 0 $MainColorset
ChangeColorset 1 $MainColorset
End
Set $tmp = (GetOutput {exec date “+%k:%M”} 1 -1)
ChangeTitle 1 $tmp
End
PeriodicTasks
Begin
If (RemainderOfDiv (GetTime) 30)==0 Then
Begin
Set $tmp = (GetOutput {exec date “+%k:%M”} 1 -1)
ChangeTitle 1 $tmp
End
End
Widget 1
Property
Position 0 0
Size 480 210
Type ItemDraw
Flags NoReliefString
Title {}
Main
Case message of
SingleClic :
Begin
End
End[/code]
Of course I could write something in python with qt or gtk, but I would really hate to waste resources for this
Any help is really appreciated