On the theory that the main thing is to deter casual crimes of opportunity, I just carry one of those retractable cable locks. Light, compact, cheap, functional. Won't stop anyone with a wire cutter, and not intended for long-term parking, but adequate for a quick stop at a restaurant or store.
e.g. https://www.amazon.com/Master-Lock-Combination-Assorted-4605D/dp/B000BD69G0/
I usually put it by my feet because I'm paranoid and afraid someone might take it, especially when traveling. I also prefer to do this so I won't forget about it.
For larger bags, I've also purchased cable locks on Amazon that will allow me to attach my bag to the railing. Note that it's not really super sturdy, it's really more of a deterrent.
This is what I got - https://www.amazon.com/Master-Lock-Combination-Assorted-4605D/dp/B000BD69G0
I have one like this that I keep in my pack: https://www.amazon.com/Master-Lock-4605D-3-Foot-Retractable/dp/B000BD69G0 It's not much, but it prevents the quick "grab and run" kind of deal. It's more likely someone will see that and move on to the next bike.
I've done exactly what you described. I took a retractable lock that people use for their bicycles and loop it through my jacket and helmet and loop it through the handlebars
http://www.amazon.com/Master-Lock-4605D-3-Foot-Retractable/dp/B000BD69G0
Maybe some sort of cable lock? A retractable one perhaps?
https://www.amazon.com/Master-Lock-Combination-Assorted-4605D/dp/B000BD69G0