Bathroom occupancy sensor

You could also try a DIY raindrop sensor if you want to try an alternative approach.

I could also imagine a slimmer version (perhaps even just using two wires) attached to the showerhead somehow.

Or you could do something similar to what I did to check if the tap is turned on.