Skip to content

Commit

Permalink
Homebrew installation documenation added. #5
Browse files Browse the repository at this point in the history
  • Loading branch information
TheFox committed Oct 26, 2016
1 parent eb69edc commit 58676e2
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,59 @@ Control [cmus](https://cmus.github.io/) with Media Keys :rewind: :arrow_forward:
## Requirements

- At least **macOS 10.8**.
- `cmake` to build it from source.
- Optional [cmus](https://cmus.github.io/) installed. ;)
- `cmake` to build it.
- Since Cmus Control doesn't have the behavior of changing any foreign processes it's highly recommended to [deactivate the *Remote Control Daemon*](http://blog.fox21.at/2015/11/20/control-cmus-with-media-keys.html).
- [cmus](https://cmus.github.io/) installed. ;)

## Install

Since Cmus Control doesn't have the behavior of changing any foreign processes it's highly recommended to [deactivate the *Remote Control Daemon*](http://blog.fox21.at/2015/11/20/control-cmus-with-media-keys.html).
You can either install Cmus Control via [Homebrew](#homebrew-installation) or [manually](#manually-installation). The preferred method of installation is via Homebrew.

### Homebrew installation

1. Add the [`thefox/brewery`](https://github.com/TheFox/homebrew-brewery) tap to brew.

brew tap thefox/brewery

2. Actual installation

brew install cmus-control

3. After a successful installation follow the Caveats output, start the service:

brew services start thefox/brewery/cmus-control

Or, if you don't want/need a background service you can just run

cmuscontrold

### Manual installation

1. You need to install cmake: `brew install cmake`
2. Run `make install` to compile *Cmus Control Daemon* and install `cmuscontrold` under `/usr/local/bin` path.
A [launchd.plist](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html) file named `at.fox21.cmuscontrold.plist` will be created under `~/Library/LaunchAgents` to start *Cmus Control Daemon* automatically on login.

If you just want to compile *Cmus Control Daemon* without installing run `make`. The binary will be created at `build/release/bin/cmuscontrold`.

## Uninstall
#### Uninstall

Just run `make uninstall`. Doing so

- `cmuscontrold` will be unloaded via [`launchctl`](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/launchctl.1.html);
- `~/Library/LaunchAgents/at.fox21.cmuscontrold.plist` will be removed;
- `/usr/local/bin/cmuscontrold` will be removed.

## Load/Unload
#### Load/Unload

After a successful installation the `cmuscontrold` is loaded/started automatically with `launchctl`. You can unload the daemon manually:
After a successful manual installation the `cmuscontrold` is loaded/started automatically with `launchctl`. You can unload the daemon manually:

make unload

Or load it manually:

make load

## Re-build
#### Re-build

After changing the source code you might want to re-build the binary and re-install it.

Expand Down

0 comments on commit 58676e2

Please sign in to comment.