excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / w / wezterm.rb
blobb132e9aa2328598c0538fa6a9bfc07a4b637b4f6
1 cask "wezterm" do
2   version "20240203-110809,5046fc22"
3   sha256 "e77388cad55f2e9da95a220a89206a6c58f865874a629b7c3ea3c162f5692224"
5   url "https://github.com/wez/wezterm/releases/download/#{version.csv.first}-#{version.csv.second}/WezTerm-macos-#{version.csv.first}-#{version.csv.second}.zip",
6       verified: "github.com/wez/wezterm/"
7   name "WezTerm"
8   desc "GPU-accelerated cross-platform terminal emulator and multiplexer"
9   homepage "https://wezfurlong.org/wezterm/"
11   livecheck do
12     url :url
13     regex(/^(\d+(?:[.-]\d+)+)-(\h+)$/i)
14     strategy :github_latest do |json, regex|
15       json["tag_name"]&.scan(regex)&.map { |match| "#{match[0]},#{match[1]}" }
16     end
17   end
19   conflicts_with cask: "wezterm@nightly"
21   app "WezTerm-macos-#{version.csv.first}-#{version.csv.second}/WezTerm.app"
22   %w[
23     wezterm
24     wezterm-gui
25     wezterm-mux-server
26     strip-ansi-escapes
27   ].each do |tool|
28     binary "#{appdir}/WezTerm.app/Contents/MacOS/#{tool}"
29   end
31   binary "#{appdir}/WezTerm.app/Contents/Resources/shell-completion/zsh",
32          target: "#{HOMEBREW_PREFIX}/share/zsh/site-functions/_wezterm"
33   binary "#{appdir}/WezTerm.app/Contents/Resources/shell-completion/bash",
34          target: "#{HOMEBREW_PREFIX}/etc/bash_completion.d/wezterm"
35   binary "#{appdir}/WezTerm.app/Contents/Resources/shell-completion/fish",
36          target: "#{HOMEBREW_PREFIX}/share/fish/vendor_completions.d/wezterm.fish"
38   zap trash: [
39     "~/.local/share/wezterm",
40     "~/Library/Saved Application State/com.github.wez.wezterm.savedState",
41   ]
42 end