Laptop lid closing and opening settings

Finally I have managed to make almost everything work in my Hackintosh Success' href='/2020/12/install-macos-catalina-on-supported-pc.html'>Catalina installed on my Lenovo IdeaPad 520 except for the laptop lid closing and opening settings. I want the laptop to sleep on close and wake on opening. Please help me with this. This is the last thing I need to get working.

Author: @KiritoAsuna7