Merge pull request #200288 from kyu08/cursor-link
[Homebrew/homebrew-cask.git] / Casks / m / mechvibes.rb
bloba3c7816da4aa113950443e9692ca1ff1c64e47e6
1 cask "mechvibes" do
2   version "2.3.6-hotfix,2.3.6"
3   sha256 "29db0b74bdde3895e4d7b38165eebb1dec91ae546244be9d1285123999b4326a"
5   url "https://github.com/hainguyents13/mechvibes/releases/download/v#{version.csv.second || version.csv.first}/Mechvibes-#{version.csv.first}.dmg",
6       verified: "github.com/hainguyents13/mechvibes/"
7   name "Mechvibes"
8   desc "Play mechanical keyboard sounds as you type"
9   homepage "https://mechvibes.com/"
11   livecheck do
12     url :url
13     regex(%r{/v?(\d+(?:\.\d+)+)/Mechvibes[._-]v?(\d+(?:\.\d+)+(?:-hotfix)?)\.dmg}i)
14     strategy :github_latest do |json, regex|
15       json["assets"]&.map do |asset|
16         match = asset["browser_download_url"]&.match(regex)
17         next if match.blank?
19         (match[2] == match[1]) ? match[1] : "#{match[2]},#{match[1]}"
20       end
21     end
22   end
24   app "Mechvibes.app"
26   zap trash: [
27         "~/Library/Application Support/Mechvibes",
28         "~/Library/Preferences/com.electron.mechvibes.plist",
29         "~/Library/Saved Application State/com.electron.mechvibes.savedState",
30       ],
31       rmdir: "~/mechvibes_custom"
33   caveats do
34     requires_rosetta
35   end
36 end