Ugh. Again yesterday some yahoo wrote an article about "How to approach women wearing headphones". I'm not gonna link to it because...well, because you just SHOULDN'T interrupt a woman (or anyone) wearing headphones. Other times not to approach a woman (a non-exhaustive list): she is reading a book, she is working on a laptop, she is on the phone, etc. It is rude to interrupt. That includes waving your hand in front of her face (WTF), or passing her a note. Just keep walking.
The simple fact is that you are not entitled to her attention. Think - why is your desire to talk to her more important than her desire to be left alone? SPOILER: it's not. Just keep walking. "BUT!" You may be saying (because someone is always saying - I have seriously had this conversation more than once on twitter). "I just want to say something nice!" or "How are you supposed to meet anyone" or "But she is cute!". I don't care. Leave her alone. Seriously, just keep walking.
I like to work in coffee shops and sometimes bars. That does not mean that I want to talk to random people. I have a pretty decent RBF, and I use a lot of common behaviors to keep folks from talking to me: headphones, laptop, avoiding eye contact, ignoring folks that approach anyway, etc. All women do this. In part because we all know that it is often safer to avoid interacting with someone (especially a guy) than to have to "reject" him in some way that could escalate. Yes, all women. So PLEASE, just keep walking.
When I am open to talking to folks, you can tell. I won't be staring at a screen, avoiding breaking focus even if you sit right next to me. You'll see that I make eye contact with my fellow humans. I may even say "hi" as you sit down or walk by. These are common social cues that let you know it is OK to approach a stranger. If you just MUST talk to someone, I recommend that you take Captain Awkward's advice and greet a nearby dude instead. Or, you know, just keep walking.