Thomas Glanzmann <[EMAIL PROTECTED]> writes: > Hi out there, > want to set a (un)mute button on my keyboard to do the following: > > When I press mute the first time the command aumix -v m should be executed, w > hen > I press it the first time aumix -v 100 should be executed. So what can I do? > > I tried the following, which does not work. > > Key SunAudioMute A A SunAudioMute > > DestroyFunc SunAudioMute > AddToFunc SunAudioMute > + I Exec aumix -v m > + I DestroyFunc SunAudioMute > + I AddToFunc SunAudioMute > + I + I Exec aumix -v 100 > + I + I DestroyFunc SunAudioMute > + I + I AddToFunc SunAudioMute > + I + I Exec aumix -v m > > Please reply also by email because I am not on the list.
Destroying a function while still in the function is not allowed. Here's one way to do it using piperead and setenv: Key SunAudioMute A A Piperead 'if [ "$$mute" == "mute" ] ; then \ printf "setenv mute no"; aumix -v 100; \ else printf "setenv mute mute"; aumix -v m; fi' -- Dan Espen E-mail: [EMAIL PROTECTED] -- Visit the official FVWM web page at <URL: http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]
