Created
June 4, 2024 23:21
-
-
Save peterldowns/35f3408fd29805c4c7a432511e73c964 to your computer and use it in GitHub Desktop.
iterm2 profiles with environment variables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call plug#begin() | |
Plug 'catppuccin/vim', { 'as': 'catppuccin' } | |
call plug#end() | |
" In iTerm / other terms that support real colors... | |
if $TERM_PROGRAM != "Apple_Terminal" | |
set termguicolors | |
if $LIGHTMODE == "1" | |
colorscheme catppuccin_latte | |
else | |
colorscheme catppuccin_mocha | |
endif | |
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/catppuccin/fzf | |
if [[ "$LIGHTMODE" == "1" ]]; then | |
# FZF THEME: catppuccin_latte | |
export FZF_DEFAULT_OPTS=" \ | |
--color=bg+:#ccd0da,bg:#eff1f5,spinner:#dc8a78,hl:#d20f39 \ | |
--color=fg:#4c4f69,header:#d20f39,info:#8839ef,pointer:#dc8a78 \ | |
--color=marker:#dc8a78,fg+:#4c4f69,prompt:#8839ef,hl+:#d20f39" | |
fi | |
if [[ "$DARKMODE" == "1" ]]; then | |
# FZF THEME: catppuccin_macchiato | |
export FZF_DEFAULT_OPTS=" \ | |
--color=bg+:#363a4f,bg:#24273a,spinner:#f4dbd6,hl:#ed8796 \ | |
--color=fg:#cad3f5,header:#ed8796,info:#c6a0f6,pointer:#f4dbd6 \ | |
--color=marker:#f4dbd6,fg+:#cad3f5,prompt:#c6a0f6,hl+:#ed8796" | |
fi | |
# bat / delta (git diff pager) | |
if [[ "$LIGHTMODE" == "1" ]]; then | |
export BAT_THEME="Catppuccin Latte" | |
fi | |
if [[ "$DARKMODE" == "1" ]]; then | |
export BAT_THEME="Catppuccin Macchiato" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# profiles > darkmode > general > Command> | |
# -- select "Command" | |
# -- use env, and the default shell launcher, so that all Darkmode terminals have `DARKMODE=1` in the environment. | |
/usr/bin/env DARKMODE=1 /usr/bin/login -fpl pd /Applications/iTerm.app/Contents/MacOS/ShellLauncher --launch_shell | |
# profiles > lightmode > general > Command> | |
# -- select "Command" | |
# -- use env, and the default shell launcher, so that all Lightmode terminals have `LIGHTMODE=1` in the environment. | |
/usr/bin/env LIGHTMODE=1 /usr/bin/login -fpl pd /Applications/iTerm.app/Contents/MacOS/ShellLauncher --launch_shell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
iterm profiles window example: