Skip to content

Commit

Permalink
update switching arch
Browse files Browse the repository at this point in the history
  • Loading branch information
cappyzawa committed Jan 4, 2024
1 parent 3636d5a commit ff89ba0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .config/starship/starship.toml
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,8 @@ disabled = true

[username]
disabled = false

[env_var.ARCH]
variable = "ARCH"
default = "x86_64"
style = "bold yellow"
2 changes: 1 addition & 1 deletion .tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ bind-key C-t send-prefix
unbind-key C-b

set-option -g default-shell /bin/zsh
set-option -g default-command /bin/zsh
set-option -g default-command "exec arch -arch arm64 /bin/zsh --login"
set-option -g focus-events on
set-option -s escape-time 0

Expand Down
7 changes: 3 additions & 4 deletions .zprofile
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ export FZF_DEFAULT_OPTS="--extended --ansi --multi"

ARCH=$(uname -m)
if [[ $ARCH == arm64 ]]; then
echo "Current Architecture: $ARCH"
eval "$(/opt/homebrew/bin/brew shellenv)"
eval "$(/opt/homebrew/bin/brew shellenv)"
elif [[ $ARCH == x86_64 ]]; then
echo "Current Architecture: $ARCH"
eval "$(/usr/local/bin/brew shellenv)"
eval "$(/usr/local/bin/brew shellenv)"
fi
export ARCH
export LDFLAGS="-L$HOMEBREW_PREFIX/lib"

0 comments on commit ff89ba0

Please sign in to comment.