Skip to content

Commit

Permalink
Merge pull request #196575 from Homebrew/add-ghostty@tip
Browse files Browse the repository at this point in the history
  • Loading branch information
krehel authored Dec 27, 2024
2 parents 281c062 + 136c144 commit 6b7e0ec
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions Casks/g/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
cask "ghostty@tip" do
version "8481,a8e5eef11cc67f87f445626f9ca2993373774bf8"
sha256 "48b3d6f68c3b6f0774d91532efb5eca9f66ea4d75129ec89cff41bd246b7974f"

url "https://tip.files.ghostty.org/#{version.csv.second}/Ghostty.dmg"
name "Ghostty"
desc "Terminal emulator that uses platform-native UI and GPU acceleration"
homepage "https://ghostty.org/"

livecheck do
url "https://tip.files.ghostty.org/appcast.xml"
regex(%r{/(\h+)/Ghostty\.dmg}i)
strategy :sparkle do |item, regex|
match = item.url&.match(regex)
next if match.blank?

"#{item.version},#{match[1]}"
end
end

auto_updates true
conflicts_with cask: "ghostty"
depends_on macos: ">= :ventura"

app "Ghostty.app"
binary "#{appdir}/Ghostty.app/Contents/MacOS/ghostty"
binary "#{appdir}/Ghostty.app/Contents/Resources/bash-completion/completions/ghostty.bash",
target: "#{HOMEBREW_PREFIX}/etc/bash_completion.d/ghostty"
binary "#{appdir}/Ghostty.app/Contents/Resources/fish/vendor_completions.d/ghostty.fish",
target: "#{HOMEBREW_PREFIX}/share/fish/vendor_completions.d/ghostty.fish"
binary "#{appdir}/Ghostty.app/Contents/Resources/zsh/site-functions/_ghostty",
target: "#{HOMEBREW_PREFIX}/share/zsh/site-functions/_ghostty"
binary "#{appdir}/Ghostty.app/Contents/Resources/terminfo/67/ghostty",
target: "#{ENV.fetch("TERMINFO", "~/.terminfo")}/67/ghostty"
binary "#{appdir}/Ghostty.app/Contents/Resources/terminfo/78/xterm-ghostty",
target: "#{ENV.fetch("TERMINFO", "~/.terminfo")}/78/xterm-ghostty"
manpage "#{appdir}/Ghostty.app/Contents/Resources/man/man1/ghostty.1"
manpage "#{appdir}/Ghostty.app/Contents/Resources/man/man5/ghostty.5"

zap trash: [
"~/.config/ghostty/",
"~/Library/Application Support/com.mitchellh.ghostty",
"~/Library/Caches/com.mitchellh.ghostty",
"~/Library/HTTPStorages/com.mitchellh.ghostty",
"~/Library/Preferences/com.mitchellh.ghostty.plist",
"~/Library/Saved Application State/com.mitchellh.ghostty.savedState",
"~/Library/WebKit/com.mitchellh.ghostty",
]
end

0 comments on commit 6b7e0ec

Please sign in to comment.