My cat repellent:
An idea may be redirecting the cat. Buy a can of tuna, put it in a bowl and put it at a different window. Do this a few days in a row and not only has the cat found a different ledge, but you have the added benefit of having selflessly fed a nice animal.