So last year I did this and squeezed a bflex driver into an old Lumicycle halogen can to get a "main beam" light with a remote switch built into the STI lever.
This worked really well, but the "dipped" beam was always a bit of a compromise between being able to see and not being annoying to others, so I've been on the lookout for something with a proper beam pattern, and the best option seems to be the Philips SafeRide. I managed to get one for around £60, and it's a great light, but running off internal NiMH batteries it was a bit of a compromise between output and battery life.
The built-in driver runs the LEDs at 0.7A, but they're rated to 1A, and given that I've got a vastly overspecced Lumicycle bottle battery (from back in the halogen days) on the bike anyway, there was only one thing to do - a b2flex driver and an external battery:
Compared to cramming stuff into Lumicycle cans, it was a fairly easy mod, except that the bolt that holds the case together screws into the original driver PCB, so you need to create something to replace it. Other people have done this mod by keeping the original board and re-using the original switch and LEDs, but I would have had to butcher it to squeeze the power socket in, so I figured I'd replace it entirely.
Replacement switch and LEDs:
The heatshrinked thing at the front is a transistor as the b2flex status pin won't drive 3 blue LEDs directly.
While I was at it, I swapped the mount for a nicer Cateye one, as the Philips one is hard to get on and off one-handed, is a bit bulky, and doesn't grip the bar very well:
Not a very neat looking pair:
Beam shots against a garage door aren't very realistic, but they do show the difference in beam shape. Philips only:
As well as the sharp cut-off, the optics put the most light at the top of the pattern, which is the bit that hits the road furthest away. The result is very even illumination over a large area of road.
The bright area in the middle above the cut-off is an artefact of the photo. I think it's because the door is a bit shiny so you're seeing some reflection of the light.
Full beam only:
The lights are much brighter than the photos suggest - the main beam light is a triple XPG running at 1A, which I think should be about 1,000 "datasheet lumens".
The stock Philips light is "only" 270 lumens, but those are actual, measured lumens, and by not losing half of them into the tree tops, it's as effective at lighting up the road as a much brighter light. I think running at 1A it should be producing around 360 lumens.
I'm very pleased with the end result. The Philips light on its own gives plenty of light to ride completely unlit roads, whilst keeping light out of other people's eyes. The full beam light means you don't feel like you're riding in a tunnel, and has the nice side effect that oncoming traffic can see you around the next corner and will typically dip before they see you. I've not timed it, but the battery should be good for over 3 hours of both lights on full.