The other bit, motion detecting, would rely on closing the lid not sleeping the computer (as a thief will generally close the lid before taking the item)... Most people have that, but it can be disabled.
It would probably make more sense and be more feasible to have the USB stick be the alarm, and have it sound if the computer is closed while it's in.
However, that sort of thing is so easy to fool that it would have to rely on not getting big enough that thieves learn to work around it.