How to force swallowed app/module to top of FvwmButton area

I use FvwmButtons to implement a taskbar. In two cases, the swallowed program or module is placed in the center of the button area, and I would like to force it’s location to either the top or bottom.

In the first case,

*FvwmButtons: (2x19 Swallow FvwmIconMan FvwmIconMan)

FvwmIconMan displays in the center, vertically, of that area, and as it grows, it exands in both directions, so that it always stays centered. I would like for it to display at the top, i.e. directly below the button above it, and grow downward. Looking at the man pages, I don’t see anything to influence this – perhaps I’m missing it. I’m thinking something that would function similarly to the ‘gravity’ specification of stalonetray. The ManagerGeometry option of FvwmIconMan doesn’t seem operative here, at least in terms of placement within the button area.

The second case is almost the same, except it involves swallowing stalonetray, which doesn’t grow. But it still displays in the center of its button area, rather than directly below the button above it. I’d like for it to end up either at the top or bottom of it’s button area.

FWIW, here’s the whole ‘sidebar’ config I’m using:

[code]DeskTopSize 1x4
*FvwmPagerBack #8f877f
*FvwmPagerFore black
*FvwmPagerHilight #8f917f
*FvwmPagerGeometry 55x165
*FvwmPagerLabel 0 robinson

*FvwmIconMan: numManagers 1
*FvwmIconMan: Resolution desk
*FvwmIconMan: background #cfc3b8
*FvwmIconMan: foreground black
*FvwmIconMan: usewinlist true
*FvwmIconMan: drawicons true
*FvwmIconMan: shape true
*FvwmIconMan: followfocus true
*FvwmIconMan: sort name
*FvwmIconMan: plainbutton up black #bdbbaa
*FvwmIconMan: focusbutton up black #a3a693
*FvwmIconMan: selectbutton up black #e8dbce
*FvwmIconMan: iconbutton up black #cfc3b8
*FvwmIconMan: buttongeometry 72x0
*FvwmIconMan: managergeometry 1x0
*FvwmIconMan: dontshow FvwmButtons
*FvwmIconMan: format “%c”
FvwmIconManaction Mouse 0 a, sendcommand iconify
FvwmIconManaction Mouse 2 n, sendcommand delete

###################### button-bar ################################

*FvwmButtons: Fore Black
*FvwmButtons: Back #cfc3b8
*FvwmButtons: Font xft:DejaVu Sans:Medium:Book:size=9
*FvwmButtons: Geometry 72x$[vp.height]-0+0
*FvwmButtons: Columns 2
*FvwmButtons: Frame 1

*FvwmButtons: (2x1 Title xterm
Action Exec konsole
#*FvwmButtons: (2x1 Title sylpheed \

Action Exec sylpheed \


FvwmButtons: (2x19 Swallow FvwmIconMan FvwmIconMan)
FvwmButtons: (2x7 Swallow FvwmPager ‘FvwmPager 0 0’)
FvwmButtons: (2x5, Frame 0, Swallow (NoClose,UseOld) stalonetray ‘exec stalonetray --kludges force_icons_size’)
FvwmButtons: (2x1 Swallow xclock 'exec /usr/bin/xclock -d -brief -bg DarkSlateGray -fg LightGoldenrod -geometry 60x20 -fn --clean-
-13-------* ')
*FvwmButtons: (icon lock.png, Action Exec xscreensaver-command -lock)
*FvwmButtons: (icon red_x.png, Action Menu Exit-Fvwm)[/code]

There are multiple approaches.

First for something fixed like stalonetray. Make the button the size you want the tray to be, then just use blank buttons for padding. This way you can completely control where it appears in your FvwmButtons layout.

For something that is dynamic like FvwmIconMan, you have two basic approaches. One is make FvwmIconMan a fixed size, and then configure FvwmIconMan to put all the Icons at the top (or right), and let FvwmIconMan figure out how to place things within its button.

The other option is to let FvwmIconMan be variable size, then use the “Top” (or other alignment flags) to position it inside the button. The problem with this approach (over the fixed size FvwmIconMan), is the FvwmIconMan module can grow outside of its button confinement if you have too many windows. For example in the default-config the RightPanel is something like

Here you will see an example of the second method, I mentioned. Here is the code that swallows FvwmIconMan in that example

*RightPanel: (120x515, Top, Swallow FvwmIconMan 'Module FvwmIconMan', Frame 0)

Though as I said, there is a bug with this approach, if one opens up too many windows FvwmIconMan will grow outside its button.

Thank you. I figured there was something obvious that I had missed. That is exactly what I needed, and works for both of my cases.

In re. the Wiki sidebar example, I see the approach there, which is to make each “button” the size of a pixel, and then explicitly specify each functional button by a pixel size. I’m pretty sure I pondered this, back in the 90’s, and dismissed it as excessively tedious. :slight_smile: I acknowledge that it does provide high flexibility.

In re. the statement that:

I’m sure there are instances where that applies. I use $[vp.height] for the geometry, and FvwmButtons seems entirely capable of computing the height of each button as height divided by number of buttons, and I like that, as it frees me from having to do it. Plus, I can resize my screen and restart, and I don’t have to mess with things (particularly important when inside VirtualBox). And, I can move my config to other machines without issues.

I like the SensorDock example. I think I’ll have to steal from it. :smiley: