Gordon Hunter, of Cairns Street East, appeared before Sheriff Alistair Brown at Kirkcaldy Sheriff Court.
Hunter, 51, admitted on October 8, 2020 at an address in Earn Road, Kirkcaldy he recklessly destroyed or damaged property belonging to another by repeatedly throwing stones at the windows of the address cracking a pane of glass.
Hunter further admitted on various occasions on June 19, 2021 at an address in Abbotsford Drive, Glenrothes he behaved in a threatening and abusive manner likely to cause fear and alarm in that he struck garden lights with a pole causing them to break, shouted and swore.
He further admitted on the same date at Huntly Drive, Glenrothes he stated to police his name was David Thomson and gave officers a wrong date of birth with the intention of perverting the course of justice, committing both offences while on bail.
He also admitted breaching bail conditions on June 21, 2021 by entering an address in Abbotsford Drive in Glenrothes.
The Procurator Fiscal Depute told the court: “The accused and the witness were drinking at the property and the accused went to bed.
"When the accused woke up he and the witness had an argument and it resulted in the accused leaving the property.
"A short time later the witness was in the living room and looked out to see the accused throwing stones towards the window. One of them cracked the window.”
The incident with the p[ole came after a disagreement with the complainer, the court was told.
The Depute said: “They were messaging back and forth, and at 1.20am, the witness was in the kitchen when she heard something smash in the back garden. She saw the accused with a wooden pole.
“Two solar lights were smashed in the back garden and police were called. The estimated costs of the damage was put at £420.”
The Fiscal Depute said a description of the accused was given to police who were able to trace him.
Hunter’s defence lawyer said his client was very much aware that a custodial sentence was likely but he said he had benefited from a supervison order and had been making the most of the opportunity given to him, which would be ‘torpedoed’ if he was sent to prison.
He urged the sheriff to strongly consider a community-based disposal instead.
Sheriff Brown told Hunter: “I hope you understand that you are in a hair’s breath of going to prison for a year.
"But it appears you have recently begun to apply yourself through supervision and you are now suitable for the Caledonian programme.”
He placed him on an eight-month restriction of liberty order requiring him to stay in his home address between 7.00pm and 7.00am each day.
He also placed him on a supervised community payback order for two years and ordered him to take part in the Caledonian programme.
He was also placed on a two-year non-harassment order prohibiting contact with his former partner.