How do i set window size for Headless Firefox?

How can I set window size for headless Firefox I tried with putting some data in Desired Capabilities but its not working. I made it work for Headless Chrome. And I tried also in Jenkins it works for Chrome but not for Firefox. Thank you