NoSleep Command Line Tool

The NoSleep utility for Mac OSX ( Mavericks et. all) that allows you to keep your computer from going to sleep even when the lid / clamshell is shut. It is accessed via a System Preferences pane and when running also shows up in the menu bar.

To use the command line tool you need to choose that option when installing NoSleep:

NoSleep Command Line Tool

It will be installed as /usr/local/bin/NoSleepCtrl and you should be able to type in NoSleepCtrl in your Terminal.app to run it ( or use the full path if that doesn’t work )

Here are the options for using it:

Usage: NoSleepCtrl [OPTIONS] ...

Options:
  -h         Show this usage guide
  -v VRBLVL  Verbose level. Default value is 1.
             0 - minimal output,
             1 - normal output,
             2 - include driver output.
  -a         Mode qualifier. Used to select AC-Adapter mode
  -b         Mode qualifier. Used to select Battery mode
             Modes can be combined (-a -b).
             Use no qualifiers to select a current mode
  -g         Get status for selected mode
  -s NVAL    Set status for selected mode
             NVAL should have (%d) or (%d,%d) format, depending
             on the specified mode (without parentheses)

Related Posts:

  • No Related Posts
This entry was posted in Tech Tips and tagged , . Bookmark the permalink.

2 Responses to NoSleep Command Line Tool

  1. Steven Zhang says:

    How can I script the “lock screen” command for nosleep?

  2. Adam Logan says:

    Thanks for setting me on the right path.

Leave a Reply

Your email address will not be published. Required fields are marked *