|Origin:||whim-wham 'decorative object, whim' (16-19 centuries), of unknown origin|
on a whim
I didn't leave just on a whim (=for no good reason).
at the whim of somebody
At work they are at the whim of the boss.
somebody's every whim
Their father had always indulged her every whim.
He appeared and disappeared at whim.