Skip to content

treydempsey/clamshell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clamshell

A helper program for OS X that will execute a given command when your laptop lid is opened and kill it once the lid is closed.

Getting Started

Clamshell is a self contained executable with no external dependencies beyond what OS X already provides through CoreFoundation and IOKit.

Prerequisites

You will need a C compiler to build clamshell. Command line tools for development can be installed with:

$ xcode-select --install

Installing

Once you have a working compiler installed build the project with make.

$ make

The application is installed into /usr/local by default, but that can be altered by specifying a different prefix.

$ make install prefix=/some/other/dir

Usage

Capture the screen and share it with a remote rtmp server. Stop sharing when the laptop lid is closed and restart sharing when the lid is reopened.

$ clamshell ffmpeg -nostats -f avfoundation -i 1 -r 4 -s 1280x800 -f flv rtmp://192.168.0.1/youtube/streaming

Built With

  • Neovim - literally the future of vim
  • Stackoverflow - Question that showed me how to interact with the IO registry simply

Contributing

Pull and feature requests are welcome. If you find this little program useful let me know!

Authors

  • Trey Dempsey** - Initial work - Github

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Execute and kill a command as your Mac OS X laptop lid is opened and closed

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published