How do I avoid becoming complacent during my commute after riding the same route for a couple of weeks?
My mind also wanders on too-familar routes, so here are a few things that I consider helpful or have been told about.  


Having some (even minor) alternative routes may help; you may want a system for choosing which one to take based on which roads are busy.  Taking this to extremes you can map out your city (thanks Criggie; also see if openstreetmap can use the data, or play with veloviewer tiles)
Some goals to compete with yourself might also help -- they help you to concentrate on the riding even if not the traffic.  I tend to slow down as I lose concentration, so thinking about being quick helps.  The sheer physical effort of some of these helps to leave the thoughts behind. Some goals could be:


Total time
Time between 2 points (Strava segments, for example)
Maximum speed on a particular stretch
Getting up the big hill without stopping/in a particular gear. 
Trying to keep your cadence (pedalling rate) up is a good one - choose a lower gear than you might by instinct.

A particularly good goal if your roads are rough is to minimise the number of potholes you hit.  This requires you to know whether it's safe to swerve thus to know what's coming up behind.
Combined with this, you can practice bunny-hopping over damaged bits of road, or lifting the front wheel over even the tiniest cracks.
Alternatively you might try keeping count of how many bikes overtake you vs. how many you overtake.    
This isn't one for me but making words/phrases out of the letters of the numberplates of cars that overtake you can help keep your eyes on the cars themselves.
I found my handlebar mirror helps -- once I got used to having one, glancing in it became a habit (and in fact with it I can see cars coming up behind out of the corner of my eye).  In turn, knowing that someone is approaching makes me keep up my awareness. 
I assume you don't have headphones on (that would be a bad idea). Practice using your rearview ears -- try to work out what's going to pass you next and how wide/fast from sound alone.  Some people like bone conduction headphones which at least don't cover your ears.
Count +1 for each car you pass and -1 for each car that passes you and you win when you get to +10. -10 means pay more attention to the road (thanks Criggie)