|
cask "betterdisplay@3" do |
|
on_big_sur :or_older do |
|
version "1.4.15" |
|
sha256 "26a75c3a4e95b076dcb7468e6ce9f9493675e4a9676fd267e5b32459db900077" |
|
|
|
livecheck do |
|
skip "Legacy version" |
|
end |
|
end |
|
on_monterey do |
|
version "2.3.9" |
|
sha256 "3ee043fd5893ab354efbc4c9a92295a21b365e55af34cc64612255878b746722" |
|
|
|
livecheck do |
|
skip "Legacy version" |
|
end |
|
end |
|
on_ventura :or_newer do |
|
version "3.5.6" |
|
sha256 "fbfdaac8699245db60260ecd4dc0d0644e3639774c20e45e2f548bd6a751f2bb" |
|
|
|
livecheck do |
|
skip "Legacy version" |
|
end |
|
end |
|
|
|
url "https://github.com/waydabber/BetterDisplay/releases/download/v#{version}/BetterDisplay-v#{version}.dmg", |
|
verified: "github.com/waydabber/BetterDisplay/" |
|
name "BetterDisplay" |
|
desc "Display management tool" |
|
homepage "https://betterdisplay.pro/" |
|
|
|
auto_updates true |
|
depends_on macos: ">= :mojave" |
|
|
|
app "BetterDisplay.app" |
|
# shim script (https://github.com/Homebrew/homebrew-cask/issues/18809) |
|
shimscript = "#{staged_path}/betterdisplay.wrapper.sh" |
|
binary shimscript, target: "betterdisplaycli" |
|
|
|
preflight do |
|
File.write shimscript, <<~EOS |
|
#!/bin/bash |
|
exec '#{appdir}/BetterDisplay.app/Contents/MacOS/BetterDisplay' "$@" |
|
EOS |
|
end |
|
|
|
uninstall quit: "pro.betterdisplay.BetterDisplay", |
|
login_item: "BetterDisplay" |
|
|
|
zap trash: [ |
|
"~/Library/Application Support/BetterDisplay", |
|
"~/Library/Application Support/BetterDummy", |
|
"~/Library/Caches/pro.betterdisplay.BetterDisplay", |
|
"~/Library/Caches/SentryCrash/BetterDisplay", |
|
"~/Library/HTTPStorages/pro.betterdisplay.BetterDisplay", |
|
"~/Library/HTTPStorages/pro.betterdisplay.BetterDisplay.binarycookies", |
|
"~/Library/Preferences/pro.betterdisplay.BetterDisplay.plist", |
|
] |
|
end |
NOTE: I am using
homebrew/localhostdeliberately for the tap name. I believe that homebrew should include a local tap by default instead of requiring users to set up their own. You may want to use a less conflictive name like___YOUR_USERNAME___/tap, and you may want to push it togithub.com/___YOUR_USERNAME___/homebrew-tapto let other people add your taps by runningbrew tap ___YOUR_USERNAME___/tap.