A sudden turn or start of the mind; a temporary eccentricity; a freak; a fancy; a capricious notion; a humor; a caprice
A whim is a wish to do or have something which seems to have no serious reason or purpose behind it, and often occurs suddenly. We decided, more or less on a whim, to sail to Morocco The premium can increase at the whim of the insurers. a sudden feeling that you would like to do or have something, especially when there is no important or good reason on a whim (whim-wham (16-19 centuries), of unknown origin)
an odd or fanciful or capricious idea; "the theatrical notion of disguise is associated with disaster in his stories"; "he had a whimsy about flying to the moon"; "whimsy can be humorous to someone with time to enjoy it"