diff options
| author | Teddy Wing | 2018-11-15 17:32:11 +0100 | 
|---|---|---|
| committer | Teddy Wing | 2018-11-15 17:32:11 +0100 | 
| commit | 3a12c91fb273bfdaf032bf5a5f4e208a2a12a044 (patch) | |
| tree | 10cd05c899dd77dc7862bc1a8f4324908a440e25 | |
| parent | b56bd0425af03df920a59cf91d8c1fb945dfe8bb (diff) | |
| download | DomeKey-3a12c91fb273bfdaf032bf5a5f4e208a2a12a044.tar.bz2 | |
Add HomebrewFormula/dome-key.rb
Generated with `make pkg`.
| -rw-r--r-- | HomebrewFormula/dome-key.rb | 63 | 
1 files changed, 63 insertions, 0 deletions
| diff --git a/HomebrewFormula/dome-key.rb b/HomebrewFormula/dome-key.rb new file mode 100644 index 0000000..c5e4a70 --- /dev/null +++ b/HomebrewFormula/dome-key.rb @@ -0,0 +1,63 @@ +class DomeKey < Formula +  desc "Control your computer with a pair of headphones" +  homepage "https://domekey.teddywing.com" +  version "1.0" +  url "https://domekey.teddywing.com/downloads/dome-key_1.0.tar.bz2" +  sha256 "a724bd988d1d40103057216c6f08ab0c768a172c8167aaef7a9f692a5aa784e9" + +  # Rust code requires at least 10.7 +  depends_on :macos => :lion + +  def install +    bin.install "dome-key" +    man1.install "dome-key.1" +    man7.install "dome-key-mappings.7" +  end + +  def plist_name +    "com.teddywing.dome-key" +  end + +  def caveats; <<~EOS +    To get started with a set of mappings, try running the these commands: + +    mkdir -p $HOME/.config/dome-key +    cat <<EOM > $HOME/.config/dome-key/mappings.dkmap +    map <Play> <Nop> + +    mode <Play><Play> { +        map <Up> <Left> +        map <Play> <Space> +        map <Down> <Right> +    } +    EOM +  EOS +  end + +  plist_options :manual => "dome-key --daemon --audio" + +  def plist; <<~EOS +    <?xml version="1.0" encoding="UTF-8"?> +    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" +    	"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +    <plist version="1.0"> +    <dict> +    	<key>Label</key> +    	<string>com.teddywing.dome-key</string> +    	<key>ProgramArguments</key> +    	<array> +    		<string>/usr/local/bin/dome-key</string> +    		<string>--daemon</string> +    		<string>--audio</string> +    	</array> +    	<key>RunAtLoad</key> +    	<true/> +    	<key>KeepAlive</key> +    	<true/> +    	<key>StandardErrorPath</key> +    	<string>/tmp/dome-key.log</string> +    </dict> +    </plist> +  EOS +  end +end | 
