I was a straight A student all though my major (EE), but I never hesitated to take a B+ if I felt the amount of work needed for an A wasn't worth it. In addition, I made sure to enjoy my free time and work on stuff that I love (software dev, for instance!). I think I was successful: IIRC, I pulled 1 all nighter in my 4.5 years as an undergrad.
Obviously, I didn't graduate with a 4.0, but I got a high enough grade to get admitted to an excellent school for a PhD.