[UNSOLVABLE] FvwmScript - How to bind different mouse buttons?

Hello everyone :wink:

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 :stuck_out_tongue: ):

[code]WindowTitle {FvwmDesktopClock}
WindowSize 480 210
Font “Shadow=1 C:xft:GeosansLight:style=Regular:size=120”

Set $MainColorset=(GetScriptArgument 1)
If $MainColorset <> {} Then
ChangeColorset 0 $MainColorset
ChangeColorset 1 $MainColorset
Set $tmp = (GetOutput {exec date “+%k:%M”} 1 -1)
ChangeTitle 1 $tmp

If (RemainderOfDiv (GetTime) 30)==0 Then
Set $tmp = (GetOutput {exec date “+%k:%M”} 1 -1)
ChangeTitle 1 $tmp

Widget 1
Position 0 0
Size 480 210
Type ItemDraw
Flags NoReliefString
Title {}
Case message of
SingleClic :

Of course I could write something in python with qt or gtk, but I would really hate to waste resources for this :stuck_out_tongue_winking_eye:
Any help is really appreciated :smiley:

I’m surprised the actions defined in FvwmButtons didn’t work.

In the manpage I noticed this flag for Swallow

NoFvwmModule / FvwmModule

And by default it will treat FvwmScript as an FvwmModule and I wonder if this is changing things.

Maybe add the NoFvwmModule flag to your Swallow line and see if that has any affect.

Thanks for your fast reply ^^

I'm surprised the actions defined in FvwmButtons didn't work.

Yeah, me too :wink:

NoFvwmModule doesn’t do the trick, after that I tried to circumvent this possible Issue by renaming the generated Window to ‘DanielDeskClock’, but to no avail…
Seems like I need to find another solution :wink: