With your tape measure and pencil, mark 1/4 inch back from the inner edge of the window casing (the roughly 1-inch board edge going around the window opening). Put the marks at the two ends of each side of the window, near each corner.
Measure the top span of the window, from the 1/4 inch marks. Transfer the measurement to a piece of trim, marking both sides on the bottom edge of the trim. Make sure there's room for a 45-degree cutoff outside both marks.
On each end, lay your tri-square at the mark and draw a 45-degree angle going outward, so the top edge of the trim within the lines is longer than the bottom edge on both ends.
Lay the trim on your miter saw, with one end under the blade. Swivel the blade to a 45-degree angle in the same direction as the mark, so it's positioned right over it. Make the cut. Repeat for the other end of the piece.
Install the top piece of trim with your trim nailer, setting it so the bottom edge of the trim is set 1/4 inch back on the casing (at your earlier marks), and the angle cuts at the ends go up and outward.
Measure and cut the other three spans of trim in the same manner as the first. Install them so that at each end butts against the end of the adjacent piece, forming miters at each of the corners.