Well, let me start by saying that checking if you have a buff and changing what a button is based on that isn't possible. So checking to see if you have incarnation doesn't exactly work. However!
Should cast ravage if you hold down shift, mangle otherwise.
/cast [mod:shift] Ravage; Mangle
That said, let me go ahead and give you some of my macros and see if we can't free up some of those buttons. Feel more than free to change around abilities so you can macro the things you want together.
If you are in cat form, stealthed, and holding shift, cases pounce. Casts mangle in either cat or bear form, will try to cast nourish if you're in caster form, or mousing over people. (Resto is my offspec)
/use [form:3,stealth,mod:shift] Pounce; [@mouseover,help,nodead] Nourish; [form:1/3] Mangle; Nourish
Cooldown macro! Make sure you prepot before pull so potion is up for this, also uses your top trinket, change 13 to 14 if you want to use bottom.
/use Virmen's Bite
/cast Nature's Vigil
If you arent an engineer, remove the first line which uses glove tinker. Otherwise, uses rip if you're holding down shift in cat form, rake if you arent holding shift, and uses growl if you are in bear form.
And so on.
/use [form:3,mod:shift] 10
/use [form:3,mod:shift] Rip; [form:3] Rake; [form:1] Growl