From 7f39d5381a62e85f9e430ef79e908ddae0f58b07 Mon Sep 17 00:00:00 2001 From: Andrew Coleman Date: Tue, 28 Mar 2023 13:31:35 -0400 Subject: [PATCH] add atuin / exa to nix profile. automatically detect and download whatever the newest wezterm release. --- setup-mac.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setup-mac.sh b/setup-mac.sh index b485b8e..53f9f1b 100755 --- a/setup-mac.sh +++ b/setup-mac.sh @@ -22,6 +22,7 @@ function has_bin() { [ -e "$HOME/.nix-profile/bin/$1" ] } +has_bin "atuin" || nix profile install nixpkgs#atuin has_bin "bash" || nix profile install nixpkgs#bashInteractive has_bin "bat" || nix profile install nixpkgs#bat has_bin "bw" || nix profile install nixpkgs#bitwarden-cli @@ -38,6 +39,7 @@ has_bin "delta" || nix profile install nixpkgs#delta has_bin "direnv" || nix profile install nixpkgs#direnv has_bin "dnsproxy" || nix profile install nixpkgs#dnsproxy has_bin "dust" || nix profile install nixpkgs#du-dust +has_bin "exa" || nix profile install nixpkgs#exa has_bin "fd" || nix profile install nixpkgs#fd has_bin "flamegraph" || nix profile install nixpkgs#flamegraph has_bin "fzf" || nix profile install nixpkgs#fzf @@ -115,8 +117,12 @@ include current-theme.conf # END_KITTY_THEME EOF +function newest_wezterm_release() { + curl -H "Accept: application/vnd.github+json" -L https://api.github.com/repos/wez/wezterm/releases/latest | jq -r '.assets | map(select(.name | startswith("WezTerm-macos"))) | first.browser_download_url' +} + if [ ! -e /Applications/WezTerm.app ] ; then - curl -Lo wezterm.zip https://github.com/wez/wezterm/releases/download/20230320-124340-559cb7b0/WezTerm-macos-20230320-124340-559cb7b0.zip + curl -Lo wezterm.zip $(latest_wezterm_release) ouch d wezterm.zip mv WezTerm-macos-*/WezTerm.app /Applications/ && rm -rf wezterm.zip WezTerm-macos-* fi