Fetching details from the dictionary...

whim; caprice; fancy
capricious; fickle; whimsical; impulsive; changeable; temperamental
気まぐれで始めた趣味が今では生きがいだ。
A hobby I started on a whim is now my reason for living.
上司の気まぐれな指示に困惑した。
I was confused by my boss's capricious instructions.
彼女の気まぐれに振り回されている。
I'm being pushed around by her whims.