Panelized button unhide thru key binding?

The title says it all, I dont know if this is ever possible. I have tried to just call the module, but even if the main fvwmbuttons bar panelized it before, it is opened again (as a new instance) if i just bind it this way:

Key     F2      A   M   FvwmButtons FvwmLauncherPanel

I dont know how to do this and I doubt it is even possible, cause of this:

 Action [(options)] command
                     Specifies  an fvwm command to be executed when the button
                     is activated by pressing return or a  mouse  button.  The
                     command  needs  to  be quoted if it contains a comma or a
                     closing parenthesis.

                     The current options of the Action are:  Mouse  n  -

I suppose that I could always emulate the thing by using another fvwmbuttons panel and AnimatedMove and binding it to a key, what do you think?

You can only depanelize a FvwmButton’s instance by clicking with the mouse on the Indicator.

– Thomas Adam

Hi there,

Are you trying to show/hide a panel from a keystroke? I’m not sure I’m understanding you correctly. If you are, I do that in my config, although I swallow things inside of the panel and show/hide those. These are the relevant bits of my fvwm config:

Key 1 A C toggle_pager

DestroyFunc toggle_pager
AddToFunc toggle_pager

  • “I” SetEnv CURSOR_X $[pointer.x]
  • “I” SetEnv CURSOR_Y $[pointer.y]
  • “I” All [DownArrowPanel] WarpToWindow 50 50
  • “I” FakeClick depth 0 press 1 wait 10 release 1
  • “I” WindowId root 1 WarpToWindow $[CURSOR_X]p $[CURSOR_Y]p

*DownArrowPanelBoxSize smart
*DownArrowPanelRows 1
*DownArrowPanelGeometry 70x10-1+0
*DownArrowPanelPadding 0
*DownArrowPanelFrame 2
*DownArrowPanel(Panel(down, indicator, smooth, delay 1, position Button bottom 0 0 mlr) PagerPanel “Module FvwmButtons PagerPanel”)

Umh! Interesting, really interesting. Yes, this is what I was looking for. I like overall the way you save the current cursor position to restore it later. Really a clean solution. :wink:

Well, the only downside is that the button is not the only element in the panel, so I will have to:
1.- Play with WartToWIndows X,Y values, or
2.- Create a lonely panel just to hold that button

Anyway thanks so much, as always, amazed by the fvwm way to do things 8) -Regards

EDIT: I choosed to play with the wartowindow values, since I have three panelized panels into the main one, parametrised the offset and got this:

Key 1 A 4 toggle_panel 80
Key 2 A 4 toggle_panel 83
Key 3 A 4 toggle_panel 85

DestroyFunc toggle_panel
AddToFunc toggle_panel
+ "I" SetEnv CURSOR_X $[pointer.x]
+ "I" SetEnv CURSOR_Y $[pointer.y]
+ "I" All [FvwmTaskbar] WarpToWindow $0 50
+ "I" FakeClick depth 0 press 1 wait 10 release 1
+ "I" WindowId root 1 WarpToWindow $[CURSOR_X]p $[CURSOR_Y]p

Thanks again for your help 8)

It’s interesting, but it won’t work always (as FakeClick demonstrates). What happens if you move your Panel? :slight_smile: [1]

– Thomas Adam

[1] I’ve never liked the use of FakeClick to simulate these sort of things.

Yep, fakeclick is sort of a hack. I’ve been using it for years though with no problem. You are also correct that it doesn’t handle if I move my panel without me also updating the fakeclick coords. I have my panels hug the upper right and lower right corners so they don’t move.

~telengard

[edit] just realized that it jumps to the window and clicks and I didn’t have to specify the coords. Been so long since I got that working I forgot how it works. :slight_smile:

Well, the positions are relative to the base panel window, so it shouldnt matter if you move that window around (anyway this panel is fixed thru Style), while the button stays in the same relative position of the panel (in this case 50 85, for example), am I wrong? The only annoying thing that I can notice is a flickering in the mouse pointer (natural I think).

Of course, the real solution would be to implement into fvwm a native way to comunicate with these buttons via bindings, but for now there is no such option…