Panel button open at startup?

FvwmButtons with a Panel command, the button is closed at startup. For example:

*BarButtons: (1x2, Panel(left, position module -10+2 top, steps 6, delay 10, indicator 30) \
	"FvwmDesker" 'Module FvwmPager FvwmDesker 0 3')

panel-close

How to keep it open at startup?

panel-open

FvwmDesker looks now much better on color Tint transparency than Pixmap, with less RAM. Not sure if Panel can be opened on startup.

Searching for this question, found this solution. This can be done with SendToModule but how to stay open?

I am trying on SimpleButton/hideBar.sys

DestroyModuleConfig HideBar: *
*HideBar: (Panel(down, steps 0, delay 0, position module left, indicator 50) \
"SimpleButton" 'Module FvwmButtons SimpleButton', Id open-button)

## Open panel
SendToModule FvwmButtons PressButton open-button 1

It makes a quick opening and then closes.

Key binding works ok
key f1 a n SendToModule FvwmButtons PressButton open-button 1

and FvwmConsole
SendToModule FvwmButtons PressButton open-button 1

Great, so this can be done.
SendToModule needs to be delayed. I couldn’t get it to work in hideBar.sys but in SimpleButton/simpleB.sys that has the app icons.

This is a temporary solution with Schedule. In the forum, somewhere it was mentioned a better way. Add this at the end of simpleB.sys.

Schedule 1500 SendToModule HideBar PressButton open-button 1

To keep things simple, I made it in one file as per manpage example.

# To include the panel in a button
*FvwmButtons: (Panel(down, delay 0, steps 16) \
     SubPanel "Module FvwmButtons SubPanel")

# To define the panel as an instance of
# FvwmButtons with a different name:
*SubPanel: (Icon my_lock.xpm, Action Exec xlock)
*SubPanel: (Icon my_move.xpm, Action Move)

Have a look at the new SimpleButton.

SendToModule delay is still there. I will make a feature request for Panel options. To include -open and -close. Or, that Panel is open at startup.

Yes, keep it open. Its has to be opened anyway when using it. Close option for those who want it.

Also, close makes Panel sometime flash the items at Restart.

Panels are more designed to be shown temporally when opened. If you want a more permanent button, don’t put it in a Panel, instead just have it in its own FvwmButtons or just position it where you want. You could make a button that could hide/show this window. This would probably be a better approach than trying to make Panels work for this.

That’s a long time ago. Maybe no one thought of using Panel command for icon panels and large-size pagers. Quickly giving more space.

work-buttons

Other hide/show configs may become too complex.

At least, not to use Schedule for the PressButton… it is “sluggish” though I have a fast machine (Schedule 500). My friend has Schedule 2000. Any other alternative solution, or fix it?

Again, this is not what the FvwmButtons panel’s were designed for, hence you are having to do some additional messing with timings to get them to start open. Maybe FvwmButtons could be updated to deal with this, but in the end all it is doing is showing/hiding a second FvwmButtons window.

Other options are not that complex to just create FvwmButtons (which you have done already) and just hide/show it as desired from button clicks, etc. I would go this route vs messing with Schedule and timings to try to make Panels do something they are not currently designed for. The effect would be the same and in the end easier to control since you don’t have to mess with Schedule timings.

There are major improvements added to the new Kise 2.0. Module corrections and better coding based on the new FvwmWiki pages.

Schedule is still there but “sluggish” is removed. Download and test how it runs.

3 Likes

Great update. :sunny: Work Desk (Desker) open Panel timing is good. But SimpleButton on slow machine is still bad Schedule 3500.

I found a trick drop it to 1000.

Make one new file to start SimpleButton/simpleB.sys

DestroyFunc OpenPL
AddToFunc OpenPL
+ I Read $[USER_DIR]/SimpleButton/simpleB.sys
+ I Schedule 1000 SendToModule HideBar PressButton open-panel 1

AddToFunc StartFunction I OpenPL

Remove Schedule from simpleB.sys

1 Like

Since you don’t seem to listen to reason, you should at a minimum add the Schedule to the StartFunction so it is more reliable and always runs after the configuration is finished being read.

That’s the solution. Remove Schedule from simpleB.sys and add function OpenPL to StartFunction. Check the previous message correction.

1 Like

I think may be it does