do something on a whim
/ɒn ə ˈwɪm/idiom
to do something suddenly, without planning, because you feel like it
сделать по прихоти, спонтанно
Чаще всего — on a whim: We booked the trip on a whim. Whimsical — причудливый.
“We booked the trip on a whim.”
“She dyed her hair pink on a whim.”
“I bought the guitar on a whim and never played it.”