I doubt that the magnets would be strong enough to hold the cover on while driving with it partly open.
It would just be too easy for wind from the wrong direction and too much leverage.
A while back, I was using a partial plastic tonneau cover that I built from some scrap greenhouse glazing. It worked fairly well, and was designed so that I could just completely remove it if I needed to put something big in the truck.
There was once or twice where I just completely removed it and left it at my parent's house or wherever else I was picking up something big. (Of course if I knew in advance, I simply removed it and left it at home in my garage.)
I liked the simplicity of just completely removing the thing.
Yesterday, I picked up some hard-drive magnets from my buddy, Tom G. (who you might remember from the
AC Dodge Neon project.)
Two of the magnets were "open-face", but the rest were pairs pinned together with spacers that would go around the disk of the hard-drive. It look me a few minutes to figure out how to get them apart without terribly pinching my fingers. What I really needed was a small pry bar that was NOT made of metal. My plastic bicycle "tire irons" worked pretty well to get the magnets apart.
I outlined one of the magnets on a hunk of foam, and then routed out the shape with a small router. (A Dremel Trio - handy tool.)
I had also picked up some Gorilla Glue. I haven't worked with it before, but have heard it's basically like Great Stuff, so that means wearing gloves and being VERY careful where it goes!
I glued in the magnet. The glue did foam up a little more than I planned, but could be easily cut with a razor when it was cured.
After than, I setup a few ounces of fiberglass resin, and put a sample of fiberglass cloth and resin over the top of it. Once that's dried, I SHOULD have a hunk of white foam with a very powerful magnet embedded in it.
I plan to drive around with it stuck to the top of my truck and getting strange looks from people.