A drunk and drugged-up husband delivered a “brutal act of domestic violence” as he repeatedly smashed his wife in the head when “intending to kill her”, a court heard.