If the books are heavy, you may want to screw the supports right into the shelf.
If you live in an older home and the windows won't stay up, try a shelf bracket.
Open the window and then put the bracket so the long end is in the track and then lower the window until it is resting on the bracket.
Shelf brackets on either side of a window or doors make the perfect swag support if you don't want a curtain rod.
Once they're in place, all you have to do is lay your fabric across them and fix it the way you want.
Coupled with a piece of two by two, four shelf brackets make the perfect base for a coat tree.
So you see these little brackets can support some big ideas! I'm Mrs. Fixit and it's just that simple!