From be15979aab09a466e649430f4d33bac379a6775a Mon Sep 17 00:00:00 2001 From: Baptiste Grenier Date: Tue, 19 Nov 2024 10:22:21 +0100 Subject: [PATCH] chezmoi: use new path for homebrew on Apple Silicon --- home/private_dot_config/private_fish/config.fish.tmpl | 9 +++++++-- home/private_dot_config/tmux/tmux.conf.tmpl | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/home/private_dot_config/private_fish/config.fish.tmpl b/home/private_dot_config/private_fish/config.fish.tmpl index efcec0c7..5e123a59 100644 --- a/home/private_dot_config/private_fish/config.fish.tmpl +++ b/home/private_dot_config/private_fish/config.fish.tmpl @@ -85,11 +85,16 @@ if status is-interactive end if test (uname) = Darwin - # Add path mainly used by brew + # Add homebrew paths + {{ if stat "/opt/homebrew/bin/" }} fish_add_path /opt/homebrew/bin + {{ else -}} fish_add_path /usr/local/bin fish_add_path /usr/local/sbin - fish_add_path /usr/local/opt/coreutils/libexec/gnubin + {{ end -}} + if test -d /usr/local/opt/coreutils/libexec/gnubin + fish_add_path /usr/local/opt/coreutils/libexec/gnubin + end # https://spicetify.app if test -e ~/.spicetify diff --git a/home/private_dot_config/tmux/tmux.conf.tmpl b/home/private_dot_config/tmux/tmux.conf.tmpl index c6947d1f..98dd2169 100644 --- a/home/private_dot_config/tmux/tmux.conf.tmpl +++ b/home/private_dot_config/tmux/tmux.conf.tmpl @@ -21,8 +21,13 @@ bind-key b send-prefix set -g default-command /usr/local/bin/fish set -g default-shell /usr/local/bin/fish {{ else if eq .chezmoi.os "darwin" -}} +{{ if stat "/opt/homebrew/bin/" }} set -g default-command /opt/homebrew/bin/fish set -g default-shell /opt/homebrew/bin/fish +{{ else -}} +set -g default-command /usr/local/bin/fish +set -g default-shell /usr/local/bin/fish +{{ end -}} {{ else if eq .chezmoi.os "linux" -}} set -g default-command /usr/bin/fish set -g default-shell /usr/bin/fish