AnimatedMove simultaneously?


I want to move a couple of windows at the same time and in the same way with AnimatedMove, is this possible in some way?

You could use conditions in there if it is sufficient.
ie. in a function: All (CurrentPage, XTerm) PlaceAgain ,or some other command/condition/test

Also, there are the fvwm modules FvwmRearrange, FvwmTile, and FvwmCascade, which you may want to investigate.

Using conditions will just move them one by one I think and the modules you mentioned doesn’t seem to be just what I’m looking for. Maybe it’s time for me to explain myself a little better :slight_smile:

I have an xclock, gkrellm and FvwmPager on the left side of my screen creating some sort of “toolbar”. What I would like to do is to move them to the left, out of the screen simultaneously by the press of a key and then move them back in the same way.

Sorry if I was unclear ant thanks for your reply!

There are several ways to achieve that.
One is using just multiple instances on move in one function. I’m almost certain I used to do it simultaneously with just rearrange module, but I can’t seem to find the code for it now.
If the programs are swallowed inside FvwmButtons (well, I suppose even if they aren’t), you can do nice things with fakeclicks.

Key F2 A N press_fvwmbuttons1 1

# make a function to fakeclick on hider. pretty straight from FAQ
AddToFunc press_fvwmbuttons1
+ I SetEnv pointer_x $[pointer.x]
+ I SetEnv pointer_y $[pointer.y]
+ I Next (HIDE_TOOLBAR, CirculateHit) WarpToWindow
+ I FakeClick depth 1 press $0 release $0
+ I WindowId root WarpToWindow $[pointer_x]p $[pointer_y]p

# define the hider. smooth makes it slide nicely if I remember correctly
HIDE_TOOLBAR: (Panel(left,smooth,indicator 10,position Module up 0 0) \
  TOOLBAR "Module FvwmButtons TOOLBAR")
TOOLBAR: (Swallow (UseOld, NoClose) "someprogram" `Exec someprogram`)

# launch the hider
Module FvwmButtons HIDE_TOOLBAR

I hope I understood it right this time :slight_smile:

EDIT: errr… FvwmButtons, obviously, not FvwmTaskBar. Sorry about that. :blush:

Just creating an instance of FvwmButtons and use ‘AnimatedMove (NameOfFvwmButtons) ±100p keep’ seems to work.

But now I have some other questions regarding FvwmButtons instead :slight_smile:

  1. Is there any way to control the size of a single cell, the only thing I’ve found is ‘Size’ which only “gives the minimum space assured” (according to the man pages) and ‘ButtonGeometry’ which seems to reglate the size of all cells. The best way to control the size I’ve found so far is to create 1 column and 800 rows (my screen resolution is 1280x800) and fill the first 90 of them with xclock, the next 502 with gkrellm and so on. Is this really the best way and are there any disadvantages of doing it this way?

  2. The third thing I want my FvwmButtons to swallow is FvwmPager. Is there a way to create a one pixel, solid color border around it? The style command doesn’t seem to apply to swallowed applications, at least the border around FvwmPager disappeared when I let FvwmButtons swallow it.

Sorry if I havn’t posted the relevant parts of my config here but the only way for me to access this wonderful forum during the weeks is using a public computer…

  1. I think that’s the only way to do it at this moment.
  2. I think the “Frame” property of FvwmButtons is what you are searching for

Quick note about the 1st question:
Say, you could have ButtonGeometry at 80x80, Rows 10, Columns 1, because it would make more sense to have xclock 1x1, grkellm 1x4, etc.

So you have a definition for a swallowed app to get a default cell size of 80x80, xclock would become 80x80, whereas gkrellm would become 80x320

While I can’t think of any disadvantages, it is a bit unclear.

Solved it using 72000 FvwmButtons and 4 images :smiley:

I’ll post the code as soon as I come home (probably some time this weekend). Thanks for all replies!


You got any indication of memory size on that sucker? I’ve been reluctant to try a stunt like that for fear of exessive memory consumption. On the other hand, properly coded, the overhead should be near zero.

Anyway, I’d be interested to see the memory footprint of that monster compared with a more conventional buttonbox



I hate to disappoint you but in fact it’s just 18000 of them since all sizes were divisible by two… :smiley:

Moving xclock, gkrellm and FvwmPager at the same time was no problem as soon as I figured out how FvwmButtons work. My next problem with the Pager border was solved using images. Here’s the relevant code:

Module FvwmButtons Toolbar *Toolbar: Geometry 90x800+0+0 *Toolbar: Back $[BGCOLOR] *Toolbar: Rows 400 *Toolbar: Columns 45 *Toolbar: (45x45, Frame 0, Swallow (UseOld, NoClose) "xclock" `Exec xclock `) *Toolbar: (45x253, Frame 0, Swallow (UseOld, NoClose) "gkrellm2" `Exec gkrellm`) *Toolbar: (45x1, Frame 0, Padding 0 0, Icon top_line.png) *Toolbar: (3x100, Frame 0, Padding 0 0, Icon left_line.png) *Toolbar: (39x100, Frame 0, Swallow (UseOld, NoClose) "FvwmPager" 'Module FvwmPager 0 3') *Toolbar: (3x100, Frame 0, Padding 0 0, Icon right_line.png) *Toolbar: (45x1, Frame 0, Padding 0 0, Icon bottom_line.png)
Once FvwmButtons was set up it was just to run the following function to hide the toolbar:

[code]AddToFunc ShowIcons

  • I All (Toolbar) AnimatedMove ±100p keep[/code]
    …and a similar one to show it again.

As for the performance aspect I havn’t noticed anything special, a ‘ps aux | grep Fvwm’ shows that FvwmButtons uses less memory than FvwmIconMan and just as much as FvwmPager. Is there another/better way to get the memory usage than this?

Nope, ps is the best measure I know.

I had been thinking of a comparison between a normal button bar, with three or four buttons, and one of your monsters. But if there was any sort of per-cell overhead then I’d expect it to show up as an order of magnitude.

Next question: how’d you stop the button box from blotting out the entire desktop. The last time I tried using a shaped panel, I had to mask it with the Shape extension.

Not sure if I understand your question…

I’ve been assuming you’ve been using a non-rectangular panel. If so, I’d expect the empty cells to show up and obscure the desktop behind them.

If not, then I got the wrong idea and my question will indeed make no sense :slight_smile:

Nah, it’s rectangular and all cells are colored the same way as my desktop… :slight_smile: