TIMIDITY_PID=$(mktemp) CCHATPROXY_PID=$(mktemp) PORT=6667 SSL_PORT=6697 SERVER=irc.koshka.love # for fluidsynth... # fluidsynth -lsi '/path/to/soundfont.sf2' & # echo $! > "$MIDI_PID" # or else for timidity... # timidity -iA -B2,8 -Os1l -s 44100 -c 'path/to/timidity.cfg' & # echo $! > "$MIDI_PID" python2 ~/.scripts/ccproxy.py -p "$PORT" "$SERVER" "+$SSL_PORT" & echo $! > "$CCHATPROXY_PID" WINEPREFIX=~/.wine32 wine '/home/gor/.wine32/drive_c/Program Files/Microsoft Chat/CChat_MP3.exe' kill "$(cat "$MIDI_PID")" "$(cat "$CCHATPROXY_PID")" rm "$MIDI_PID" "$CCHATPROXY_PID"