3 questions: BusyCursor, startup notification, text wordwrap

Hey all, I’ve been fooling around with fvwm for the last 6 months or so, and I seem to be getting the hang of it, and learning new things everyday. There are three nagging things that I can’t seem to figure out by searching or experementing so I figured I’d set up an account here and get some advice.

  1. I’m using Ikaro’s DockLaunch function to launch apps when clicking an icon on a custom FvwmButton. Is it possible to add functionality to either DockLaunch, or elsewhere, to change the cursor to a busy cursor while the program is loading, and then change it back to the pointer when done?

  2. Is there some sort of notification that can be checked to see when fvwm finishes starting (ie. loads up fvwm and all init modules like fvwmbuttons). I was hoping to show a splashscreen that would disapear when fvwm finishes starting. I know there is a timer function for fvwmsplash, but this doesn’t make the splash very portable.

  3. Is it possible to wordwrap text contained in an FvwmButton? I am using the Title attribute to add some text to part of a button, but it’s very annoying, since word wrap doesn’t work with Title, I need add text line by line and make sure it doesn’t get cut off.

Thanks in advance for your help. This is probably a lot for one post, but I figured it was better to do it all in one then post three seperate questions.

FVWM does this inherently for you:

CursorStyle WAIT <pixmap>

You might also be interested in:


as well.

Sure, why not add as the very last line in your StartFunction for an action to take place, or end?

It’s a facet of the button width – alas, no.

– Thomas Adam.

Thanks for getting back to me. I tried to implement the two suggestions you made, but I still can’t seem to get either to work.

For my 1st question:

Before I didn’t add a cursor style for WAIT, but I did now. It looks like:

CursorStyle WAIT watch

I’m not sure if this changes anything at all since I think watch is the default. I may be wrong though.

I also tried to put BusyCursor in a few places before with no luck. Now I added this to the top of the DockLaunch function.

+ I BusyCursor Wait True

This still gives no busy cursor when I click on the icon to launch the program, so I must be doing something wrong. Any tips?

For my 2’nd question:

I added this as the first line of my StartFunction:

+ I Module FvwmBanner

This works and pops up the banner when fvwm starts.

Now I added this as the last line of StartFunction, as you suggested:

+ I KillModule FvwmBanner

When I add this line, nothing appears, presumable because the module gets killed right away. Any tips here?

You’re right – I prefer using:

CursorStyle WAIT dot

Don’t add it to the function – rather add it outside, anywhere within your fvwm2rc file.

Start FvwmBanner with an over-cautious TimeoutValue:

DestroyModuleConfig FvwmBanner: *
*FvwmBanner: Timeout 900

Then your module will die when the function ends, given the KillModule line as you have it, above.

– Thomas Adam.

First off, thanks for your help thus far :slight_smile:, unfortunatly I still seem to be having problems implementing both things:

For the BusyCursor stuff:
I think I should explain a little better. I do get busy cursors for certain events in fvwm, namely when fvwm initially starts up and also when programs like firefox call it. What I want to do is give a busy cursor during the time when a user clicks on an icon to launch a program to when the window appears.

I added this line to my .fvwmrc

BusyCursor Wait True

I have also tried it with:

BusyCursor *True

But that doesn’t seem to change any of the functionality I already have.

It may help if I give some snips of how I launch a program:
Here is a snip from my button that lets me launch rox:

*FvwmBottomBar (1x1+0+0, Icon icons/home.png, ActiveIcon icons/home_sm.png, ActionOnPress, Action(Mouse 1) `DockLaunch rox rox $left $top`)

Here is the DockLaunch function it calls:

[code]DestroyFunc DockLaunch
AddToFunc DockLaunch

  • C Exec $0
  • D Exec $0
  • H Any ($1) WindowList ($1) Rectangle +$2+$3 0 -100m CurrentAtEnd UseListSkip SortByClass NoCurrentDeskTitle
  • H None ($1) Exec $0[/code]

For the Banner question
The banner still gets killed before it can appear even with a high timeout. I’m assuming this happens because while the tasks in the start function are executed in sequence they do not wait for the one before it to end.

I have this for the first line in my StartFunction:

+ I Module FvwmBanner

and this as the last line in my StartFunction:

+ I KillModule FvwmBanner

And this is my banner code:

DestroyModuleConfig FvwmBanner: * *FvwmBanner: NoDecor *FvwmBanner: Pixmap fvwm_splash.png *FvwmBanner: Timeout 900

Thanks again for your help… hopefully I can get some of this sorted out :slight_smile:

Right – that’s slightly different from BusyCursor – what you’re after me is the XStartupNotification stuff – or so it seems. The freedesktop.org guys are defining that – and there are some apps already that might be of help to you – listed on the freedesktop.org site.

Yeah – the first definition was correct – and accurate. But what you’re asking isn’t available in that way.

What you therefore want to do is change the end of your StartFunction, so that for the last application you start up (well call it “Xapp” for example’s sake), before you kill the FvwmBanner, you do something like this:

AddToFunc StartupFunction
+ I ......
+ I Exec exec Xapp
+ I Wait Xapp
+ I KillModule FvwmBanner

– Thomas Adam

It can be really difficult to get precise timings on fvwm startup. Another thing you might look into, especially if you’ve got a module immediately prior is the ‘ModuleSynchronous’ command. I’m not sure if there are other items in the armory but ‘wait’ and ‘modulesynchronous’ seem to be the main ones.

Mine’s probably all wrong because I’m always doing stuff goofy but

DestroyFunc StartFunction
AddToFunc StartFunction
+ I Test (Init) ModuleSynchronous FvwmBanner
+ I Module FvwmButtons
+ I Test (Init) Exec exec ogg123 ~/.fvwm/sounds/startup.ogg

tends to have processing hang until banner’s up - then buttons starts and the ogg plays (stole it from Knoppix) and, by that time, the banner’s timeout has ended and the pic goes out when everything’s ready. Synchronizing image, sound, and startup is not at all what you’re trying to do directly (synchronize banner directly with initialization end, if I understand), but maybe not too different an effect and might give some ideas.

For me, without synchro, buttons and especially the ogg fired off before banner ever got up and wait hung everything for some reason though it should work.

Good luck.

Well I’m happy right now :slight_smile:, I was able to figure out the busy cursor thing. In the DockLaunch function I needed to add a wait and a proper window-id:

So now DockLaunch looks like this:[code]DestroyFunc DockLaunch
AddToFunc DockLaunch

  • C Exec $0
  • C Wait $1
  • D Exec $0
  • H Any ($1) WindowList ($1) Rectangle +$2+$3 0 -100m CurrentAtEnd UseListSkip SortByClass NoCurrentDeskTitle
  • H None ($1) Exec $0[/code]
    and it is used like this:
*FvwmBottomBar (1x1+0+0, Icon icons/home.png, ActiveIcon icons/home_sm.png, ActionOnPress, Action(Mouse 1) `DockLaunch rox ROX-Filer $left $top`)

and of course I need this:

BusyCursor Wait True

I was making things way too complicated, and I started wondering if I would need to patch some of the fvwm source to get what I wanted.

I still haven’t been successful with the splash window. Adding a Wait to the StartFunction so far has left the splash hanging, but now I just figured out how Wait actually works so maybe I’ll have more success.

Thanks ThomasAdam and digiot, Your tips are getting me in the right direction!