1
mirror of https://github.com/jakejarvis/dotfiles.git synced 2025-04-26 03:45:21 -04:00
dotfiles/zsh/rosetta.zsh

11 lines
417 B
Bash

# Set iTerm color scheme to Intel blue when session running via Rosetta2
# https://cutecoder.org/software/detecting-apple-silicon-shell-script/
if [[ "$(uname -m)" == "x86_64" && "$(sysctl -in sysctl.proc_translated)" == "1" ]]; then
ARCH_BG="003862" # Intel-ish blue
else
ARCH_BG="0B0B0B" # boring black
fi
# https://iterm2.com/documentation-escape-codes.html
echo -ne "\033]1337;SetColors=bg=${ARCH_BG}\007"