Skip to content

Instantly share code, notes, and snippets.

@AldoMX
Created September 14, 2025 18:18
Show Gist options
  • Select an option

  • Save AldoMX/bde8dd31df0ec5cfe9f01001938e3e16 to your computer and use it in GitHub Desktop.

Select an option

Save AldoMX/bde8dd31df0ec5cfe9f01001938e3e16 to your computer and use it in GitHub Desktop.
Cask for BetterDisplay v3.5.6

BetterDisplay v3.5.6

Original: https://github.com/Homebrew/homebrew-cask/blob/9658617b606dd422acb65dbc28748a7b88e37358/Casks/b/betterdisplay.rb

The only change was to add @3 suffix and disable the livecheck.

brew tap-new homebrew/localhost
mkdir -p $(brew --repo homebrew/localhost)/Casks/b
curl -LsS --output-dir $(brew --repo homebrew/localhost)/Casks/b https://gist.github.com/AldoMX/bde8dd31df0ec5cfe9f01001938e3e16/raw/23be6c12828129d7df12f33d602d9b75cedde3af/betterdisplay@3.rb
brew install --cask betterdisplay@3

Do not forget to disable updates in the app.

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
@AldoMX
Copy link
Author

AldoMX commented Sep 14, 2025

NOTE: I am using homebrew/localhost deliberately 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 to github.com/___YOUR_USERNAME___/homebrew-tap to let other people add your taps by running brew tap ___YOUR_USERNAME___/tap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment