shell(colors): don't set colors when running inside a known terminal emulator

This commit is contained in:
PowerUser64 2025-05-30 14:53:00 -07:00
parent b321e49b22
commit 91d650025a

View file

@ -1,4 +1,15 @@
#!/bin/sh #!/bin/sh
# check if we're running inside a terminal that already has a color scheme configured for it
if : ||
[ "${KITTY_PID:+true}" = true ] ||
[ "${ALACRITTY_WINDOW_ID:+true}" = true ]
then
# we are running inside a terminal emulator that has a color config provided
# by these dotfiles, so we don't need to provide our own
return
fi
# base16-shell (https://github.com/chriskempson/base16-shell) # base16-shell (https://github.com/chriskempson/base16-shell)
# Base16 Shell template by Chris Kempson (http://chriskempson.com) # Base16 Shell template by Chris Kempson (http://chriskempson.com)
COLOR_SCHEME="${COLOR_SCHEME:-onedark}" COLOR_SCHEME="${COLOR_SCHEME:-onedark}"