Gathering a heading
Sew two parallel rows inside the allowance, leave long thread tails, and pull the bobbin threads. Even the gathers with your fingers until the width matches the track. Tie the tails. A gathering foot on a long strip is the machine version. Test the stitch length on a scrap so the cloth does not chew.
This is the same idea as gathering a skirt, on a longer piece. The gathering page is the stitch. This page is the curtain top.
Do not gather a cloth you have not washed, if it is a cotton. The fullness changes when the cloth shrinks.