diff options
author | Teddy Wing | 2019-06-01 16:25:11 +0200 |
---|---|---|
committer | Teddy Wing | 2019-06-01 16:25:11 +0200 |
commit | 9b87a2600ff5263b6c3a22affdc5b02f3e7fb102 (patch) | |
tree | f460e82ccfd5033b96e0668ff0e7d700b0289029 | |
download | homebrew-formulae-9b87a2600ff5263b6c3a22affdc5b02f3e7fb102.tar.bz2 |
Add formulae from existing projects
Copy over all Homebrew formulae that I've been putting in project
repositories.
Now that I have a few formulae, grouping them together in a tap makes it
more easy to install and upgrade them. No need to tap multiple
repositories or use the full URL to a formula.
-rw-r--r-- | HomebrewFormula/dome-key.rb | 67 | ||||
-rw-r--r-- | HomebrewFormula/git-branch-list.rb | 23 | ||||
-rw-r--r-- | HomebrewFormula/harvester.rb | 22 | ||||
-rw-r--r-- | HomebrewFormula/passextract.rb | 20 | ||||
-rw-r--r-- | HomebrewFormula/qcd.rb | 27 |
5 files changed, 159 insertions, 0 deletions
diff --git a/HomebrewFormula/dome-key.rb b/HomebrewFormula/dome-key.rb new file mode 100644 index 0000000..42e3e7c --- /dev/null +++ b/HomebrewFormula/dome-key.rb @@ -0,0 +1,67 @@ +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 "03fd038e1ae67ce1fce949d2d5fcafb50bbee2f4344b71c16577929c557718a1" + + # 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 + + If `dome-key` is already running, load the new mappings: + + dome-key --reload-mappings + 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 diff --git a/HomebrewFormula/git-branch-list.rb b/HomebrewFormula/git-branch-list.rb new file mode 100644 index 0000000..23866c9 --- /dev/null +++ b/HomebrewFormula/git-branch-list.rb @@ -0,0 +1,23 @@ +class GitBranchList < Formula + desc "Maintains a list of Git branches that can be checked out quickly" + homepage "https://github.com/teddywing/git-branch-list" + url "https://github.com/teddywing/git-branch-list/archive/v0.1.2.tar.gz" + sha256 "423172ecbb79093060eeca85c31fc8e837ec5733f7244cbc22f36b879062a330" + + def install + bin.install "git-branch-list" + bash_completion.install "git-branch-list.bash-completion" => "git-branch-list" + end + + def caveats; <<~EOS + To enable tab completion, add the following to your bash profile: + + source #{etc}/bash_completion.d/git-branch-list + EOS + end + + test do + assert_equal "nl: .git/info/git-branch-list: No such file or directory", + shell_output("git branch-list 2>&1", 1).strip + end +end diff --git a/HomebrewFormula/harvester.rb b/HomebrewFormula/harvester.rb new file mode 100644 index 0000000..c5213dd --- /dev/null +++ b/HomebrewFormula/harvester.rb @@ -0,0 +1,22 @@ +class Harvester < Formula + desc "A program that wraps 'hcl' to interact with Harvest with a Timetasker-like interface" + homepage "https://github.com/teddywing/harvester" + url "https://github.com/teddywing/harvester/archive/v0.2.0.tar.gz" + sha256 "50533a5d61a6363581bb0cd5856ec7f7175ae60933001e761fa96520b4aed897" + + def install + bin.install "harvester" + bash_completion.install "harvester.bash-completion" => "harvester" + end + + def caveats; <<~EOS + To enable tab completion, add the following to your bash profile: + + source #{etc}/bash_completion.d/harvester + EOS + end + + test do + shell_output("bash -c 'harvester --help'") + end +end diff --git a/HomebrewFormula/passextract.rb b/HomebrewFormula/passextract.rb new file mode 100644 index 0000000..11a537b --- /dev/null +++ b/HomebrewFormula/passextract.rb @@ -0,0 +1,20 @@ +class Passextract < Formula + desc "An interface to easily copy login information from Pass" + homepage "https://github.com/teddywing/Passextract" + version "0.4.0" + url "https://github.com/teddywing/Passextract/releases/download/v0.4.0/passextract-0.4.0_osx_amd64.tar.bz2" + sha256 "622439d19d2cedde4c6666d29cc9fad5487083da3e26660b66910e2f469eb54e" + + def install + bin.install "passextract" + bash_completion.install "passextract.bash-completion" => "passextract" + man1.install "passextract.1" + end + + def caveats; <<~EOS + To enable tab completion, add the following to your bash profile: + + source #{etc}/bash_completion.d/passextract + EOS + end +end diff --git a/HomebrewFormula/qcd.rb b/HomebrewFormula/qcd.rb new file mode 100644 index 0000000..cacf575 --- /dev/null +++ b/HomebrewFormula/qcd.rb @@ -0,0 +1,27 @@ +class Qcd < Formula + desc "Define shortcuts to directories for quick `cd`s" + homepage "https://github.com/teddywing/qcd" + url "https://github.com/teddywing/qcd/archive/v0.2.1.tar.gz" + sha256 "de90ed93ba2d657253df6b8bed46cec2c4c1e796347a39a8449f1059cca33438" + + def install + prefix.install "qcd" + bash_completion.install "qcd.bash-completion" => "qcd" + end + + def caveats; <<-EOS.undent + qcd is a shell function, and must be sourced before it can be used. + Add the following command to your bash profile: + + source #{opt_prefix}/qcd + + To enable tab completion, add the following to your bash profile: + + source #{etc}/bash_completion.d/qcd + EOS + end + + test do + shell_output("bash -c 'source #{prefix}/qcd && qcd -h'") + end +end |