Most actions for the client are defined in web-client-config-actions.xml. You can override these or add new ones in your web-client-config-custom.xml file.
You'll need to define an action with a custom evaluator. The evaluator gets given the Node representing the item being rendered in the client. You can then test the type of the node and decide whether to show the action.
Have a look in the org.alfresco.web.action.evaluator package for several examples.