Hi all. I’m having a few issues trying to use FvwmBanner to display graphics on the screen for various reasons. For example, a coffee cooker. This is a simple 5 minute timer, after which a banner is displayed to tell me my coffee’s ready. The function is: [code]DestroyFunc FuncCoffeeCooked
AddToFunc FuncCoffeeCooked
- I DestroyModuleConfig FvwmBanner: *
- I *FvwmBanner: NoDecor
- I *FvwmBanner: PixMap coffee.png
- I *FvwmBanner: Timeout 5
- I Module FvwmBanner
- I WindowId (FvwmBanner) Layer 0 10[/code]
I’ve also used it to display volume increasing/decreasing and mute on/off banners for a few seconds at a time when relavent media keys are pressed. However, none of these work when I first start Fvwm. In fact I have to restart it twice before anything works. At that point the coffee cooker and volume control work, but the mute banner is still intermittent. Relavent stuff:
[code]#--------------------------------
Display a banner whenever the system is muted or unmuted, or volume is changed
DestroyFunc FuncDecreaseVolume
AddToFunc FuncDecreaseVolume
- I Exec exec aumix -v-3
- I DestroyModuleConfig FvwmBanner: *
- I *FvwmBanner: NoDecor
- I *FvwmBanner: PixMap voldown.png
- I *FvwmBanner: Timeout 1
- I Module FvwmBanner
- I WindowId (FvwmBanner) Layer 0 10
DestroyFunc FuncIncreaseVolume
AddToFunc FuncIncreaseVolume
- I Exec exec aumix -v+3
- I DestroyModuleConfig FvwmBanner: *
- I *FvwmBanner: NoDecor
- I *FvwmBanner: PixMap volup.png
- I *FvwmBanner: Timeout 1
- I Module FvwmBanner
- I WindowId (FvwmBanner) Layer 0 10
DestroyFunc FuncMuteUnmute
AddToFunc FuncMuteUnmute
- I PipeRead “$[FVWM_USERDIR]/scripts/mute.sh”[/code]
And “mute.sh”:[code]#! /bin/sh
$Aumix: aumix/src/mute,v 1.1 2002/03/19 01:09:18 trevor Exp $
Copyright © 2001, Ben Ford and Trevor Johnson
Modified to display stuff in FVWM by Andrew Simpson, 04/2005
Run this script to mute, then again to un-mute.
Note: it will clobber your saved settings.
volumes=$(aumix -vq |tr -d ,)
if [ $(echo $volumes | awk ‘{print $2}’) -ne 0 -o
$(echo $volumes | awk ‘{print $3}’) -ne 0 ]; then
aumix -S -v 0
echo “+ I DestroyModuleConfig FvwmBanner: *”
echo “+ I *FvwmBanner: NoDecor”
echo “+ I *FvwmBanner: PixMap mute.png”
echo “+ I *FvwmBanner: Timeout 2”
echo “+ I Module FvwmBanner”
else
aumix -L > /dev/null
echo “+ I DestroyModuleConfig FvwmBanner: *”
echo “+ I *FvwmBanner: NoDecor”
echo “+ I *FvwmBanner: PixMap unmute.png”
echo “+ I *FvwmBanner: Timeout 2”
echo “+ I Module FvwmBanner”
fi[/code]
(largely taken from the “mute” script included with aumix)
The behaviour is sort of intermittent, which is what confuses me. Is there anything obviously wrong, or easily improveable, with these functions? Is there a simpler way to achieve the same effect?