No trigger is needed... just always add the tax when a taxable item is in the cart.
Create a calculation as listed above to figure out the taxable value... it would be just like above in your case:
TaxableValue = (([Category]!=1)?[TotalPrice]:0)
Then set up the rule to tax based on the total of the TaxableValue column if it isn't zero.