hiding conky on particular page

Hi!

I have only one desktop and I want to hide conky on its particular page (say, fifth). So I compiled the following code from various sources:

DestroyModuleConfig FvwmEvent-newPage: *
*FvwmEvent-newPage: new_page FuncHideMyConky

Module FvwmEvent FvwmEvent-newPage

DestroyFunc FuncHideMyConky
AddToFunc   FuncHideMyConky
+ I PipeRead '[[ $[page.nx] -eq 4 && $[page.ny] -eq 0 ]] && \
    echo "Function ToggleMyConky" || echo "Function ToggleMyConky"'
    
DestroyFunc ToggleMyConky
AddToFunc ToggleMyConky
+ I Next (MyConky) WindowShade $[shade]
+ I Test (EnvMatch shade True)
+ I TestRc (Match) SetEnv shade False
+ I TestRc (NoMatch) SetEnv shade True

Conky is configured as horizontal panel and the following options are set in .conkyrc:

own_window_type normal
own_window_class MyConky

But this configuration does not work as I intended: conky is toggled off and on in cycle regardless of the page number that I switch to. What’s wrong here and how to adjust that code for my needs?

Fvwm version: 2.6.5

Kind regard.

Hi,

what is your DesktopSize?

TF