feat: add env var for terminal color and make vim render light theme

This commit is contained in:
Daniel Bauer
2026-06-11 10:32:34 +02:00
parent 6070189afa
commit c23a8a01fb
3 changed files with 78 additions and 2 deletions

View File

@@ -1,3 +1,10 @@
# Detect the terminal's light/dark background (OSC 11) and expose it as
# $TERM_BACKGROUND so nvim and other tools can pick a matching theme. Must run
# *above* the p10k instant-prompt block because it reads the tty.
if [[ -o interactive && -z "$TERM_BACKGROUND" && -x "$HOME/bin/term-background" ]]; then
export TERM_BACKGROUND="$("$HOME/bin/term-background")"
fi
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.