Maurizio Dall'Acqua wrote:
> Can you post an example of your .ctwmrc with aplay playing .wav files?
> Thanks in advance.
I should perhaps have mentioned that I use pulseaudio.
In my ~/.xinitrc file I have
pulseaudio --start
That's also the file that invokes ctwm.
I have far too much junk in my .ctwmrc (going back about 20 years or more) to
post the whole thing but here's the relevant bit of my test file.
The 'Play' button, in the Toolmenu below invokes aplay with a .wav file.
The file path is relative to my ~ directory. But I could give a full path name
starting with "/".
# A Pinnable menu to invoke tools (Pine, or aplay, or xv)
menu "ToolMenu"
{
"PIN/UnPIN" f.pin
"Pine" ! "xterm -cm -fn 10x20 +sb -e pine &"
"Play" ! "aplay audio/test/test3.wav &"
"XV" ! "cd xv;xterm -cm -fn 10x20 -geometry 20x3-5+5 +sb -e xv
-geometry -5+5 &"
#... other tools ....
}
Note:
! string
is an abbreviation for
f.exec string
then, in the buttons section of .ctwmrc, specify that Button 3 in root window
should invoke the ToolMenu
### -- Mouse button actions in different contexts --
....
## Button actions without modifier keys in "root" window.
Button3 = : r : f.menu "ToolMenu"
Alternatively I think it should be possible to define a function playsound
something like this:
Function "playsound"
{
f.exec "aplay audio/test/test3.wav &"
}
Then do something like this to make Shift key plus function key F1 invoke
aplay in all contexts:
# Shift+F1 invokes playsound in any context:
"F1" = s : all : f.playsound
But I have not tested that.
There are several example .ctwmrc files with screenshots here (going back to
1998) :
http://xwinman.org/ctwm.php
The example from cedric.cuche seems to include Audio, but it may not work in
exactly that form in 2015!
I think there are other examples of .ctwmrc available online which search
engines can find.
I hope that's of some use.
Aaron
http://www.cs.bham.ac.uk/~axs