Is there a rule of thumb on tipping in Spain?
Yes, don't tip like an American.
I don't tip at all although I know others do. The general consensus is to leave the loose change but as I never pay with cash there's never any loose change to leave. I'm not about to embark on the slippery slope of adding a percentage to my bill as we all know how that ends up.
Do as you do in the USA, minus 95-100%.
Same as already been stated. Leave a couple coins, maybe a euro for a cafe or restaurant server. For exceptional service up to 10% for bartenders and doormen. For taxis round up to the nearest euro.
Whatever you do, don’t tip like in the U.S.
I tip around 10% and always leave tips for the housekeepers each day. Wages in Spain are very low and they appreciate small tips. Just don't tip like they do in the US.
In Catalonia, we tend to "round up". That is, if the bill is say 9.80, we leave 10; if 38.40 we leave 40; if 156 we leave 160. This goes for taxis, bars and restaurants. But this only applies if the service received has been "as expected". Then, if the service has been "exceptional", then tipping is discretional but probably 10-20€. Equally, if the service is deemed "bad", no tip whatsoever. Here there won't be frowning upon or chasing you for a tip.
NOTE you are NOT tipping the individual but the business. Over here, tips are collected in a "jar" -so to speak- and divided equally among the staff.
There isn't any rule or common practice for tipping doormen (hotel). That's entirely discretional.
Contrary to some other countries, staff does NOT rely on tips to "make ends meet"; there are minimum salary laws in place to guarantee that. Something else is whether the minimum salary should be higher...