excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / a / alfred@4.rb
blob533ded643ea4eb14bad91e5c62a4b0170f4b6783
1 cask "alfred@4" do
2   version "4.8,1312"
3   sha256 "dd57e9374e21cd8f6f74628523fd3b0e59d6a40bb24920e5bdf90772d596c486"
5   url "https://cachefly.alfredapp.com/Alfred_#{version.csv.first}_#{version.csv.second}.dmg"
6   name "Alfred"
7   desc "Application launcher and productivity software"
8   homepage "https://www.alfredapp.com/"
10   livecheck do
11     url "https://www.alfredapp.com/app/update#{version.major}/general.xml"
12     strategy :xml do |xml|
13       version = xml.elements["//key[text()='version']"]&.next_element&.text
14       build = xml.elements["//key[text()='build']"]&.next_element&.text
15       next if version.blank? || build.blank?
17       "#{version.strip},#{build.strip}"
18     end
19   end
21   auto_updates true
23   app "Alfred #{version.major}.app"
25   uninstall quit: "com.runningwithcrayons.Alfred"
27   zap trash: [
28     "~/Library/Application Support/Alfred",
29     "~/Library/Caches/com.runningwithcrayons.Alfred",
30     "~/Library/Cookies/com.runningwithcrayons.Alfred.binarycookies",
31     "~/Library/Preferences/com.runningwithcrayons.Alfred-Preferences.plist",
32     "~/Library/Preferences/com.runningwithcrayons.Alfred.plist",
33     "~/Library/Saved Application State/com.runningwithcrayons.Alfred-Preferences.savedState",
34   ]
35 end