Laptop and lid close

I am using my laptop in dual boot with windows 10. when i used i3wm with endeavour os config whenever i closed the lid it will save battery. I recently installed qtile with my custom config. how to replicate the same?

I also observed in i3 config there is this setting

exec --no-startup-id xset s 480 dpms 600 600 600

can i include in autostart.sh xset s 480 dpms 600 600 600 & and replicate i3 behaviour. I am also using auto-cpufreq both with i3wm and qtile.

thanks