How to use external monitor with MacBook Air closed and on battery power?

I often use my MacBook Air (running OS X 10.9.5) closed at a docking station, where it's hooked to external monitor, keyboard/trackpad, and power. All good. The only issue is that occasionally the external power will come loose or jostle*, which turns off the external monitor or causes it to flicker. I understand the system is designed to work this way -- no external monitor when closed unless the power is plugged in.

My question is: how to change this default behavior? i.e. keep the external monitor going while closed on battery power?

[*] Why you ask? My loving, atttention-seeking cats.


You can. All you need is an app such as NoSleep.

NoSleep


In case it helps anyone who isn't comfortable downloading an app for this. I have the exact same need when I forget to bring my AC Adapter to the office, and I've worked around it by simply:

  1. Mirroring the 2 displays (MacBook's & external)
  2. Dimm the MacBook display all the way down to off (press F1 until the display turns off)

I still can't close the lid, but my battery saving needs are met.