This isn't 100% burglar proof, but that's what my bedside weapon is for. I just need an early warning if someone has messed with any of the windows.
Most window alarms work via a magnet. There is a sensor on the inside of the window frame that is wired up to your security system. Then there is a magnet attached to the window. If the magnet moves away from the sensor, the circuit is broken and the alarm sounds.
With this in mind, I purchased two magnets for our two bedroom windows and mounted them accordingly.
Now we can sleep with the windows open and the alarm active for that zone. Keep in mind not to open the window too much as to let someone crawl into the window without having to open it further.
Forgot to add this. I purchased these on Amazon for $4/pc. Expensive for a magnet covered in plastic, but it was easier than making one.