From 3a12c91fb273bfdaf032bf5a5f4e208a2a12a044 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 15 Nov 2018 17:32:11 +0100 Subject: Add HomebrewFormula/dome-key.rb Generated with `make pkg`. --- HomebrewFormula/dome-key.rb | 63 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 HomebrewFormula/dome-key.rb (limited to 'HomebrewFormula') 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 < $HOME/.config/dome-key/mappings.dkmap + map + + mode { + map + map + map + } + EOM + EOS + end + + plist_options :manual => "dome-key --daemon --audio" + + def plist; <<~EOS + + + + + Label + com.teddywing.dome-key + ProgramArguments + + /usr/local/bin/dome-key + --daemon + --audio + + RunAtLoad + + KeepAlive + + StandardErrorPath + /tmp/dome-key.log + + + EOS + end +end -- cgit v1.2.3