diff --git a/.config/zsh/theme.zsh b/.config/zsh/theme.zsh
index 6ecd5887..a4208b25 100644
--- a/.config/zsh/theme.zsh
+++ b/.config/zsh/theme.zsh
@@ -1,107 +1,112 @@
-#!/bin/sh
-# base16-shell (https://github.com/tinted-theming/base16-shell)
-# Scheme name: Catppuccin
-# Scheme author: Pocco81 (https://github.com/pocco81)
+#!/usr/bin/env sh
+# tinted-shell (https://github.com/tinted-theming/tinted-shell)
+# Scheme name: Rosé Pine
+# Scheme author: Emilia Dunfelt <edun@dunfelt.se>
# Template author: Tinted Theming (https://github.com/tinted-theming)
-export BASE16_THEME=catppuccin
+export BASE16_THEME=rose-pine
-color00="1e/1e/28" # Base 00 - Black
-color01="f2/8f/ad" # Base 08 - Red
-color02="ab/e9/b3" # Base 0B - Green
-color03="fa/e3/b0" # Base 0A - Yellow
-color04="96/cd/fb" # Base 0D - Blue
-color05="dd/b6/f2" # Base 0E - Magenta
-color06="b5/e8/e0" # Base 0C - Cyan
-color07="d7/da/e0" # Base 05 - White
-color08="57/52/68" # Base 03 - Bright Black
-color09=$color01 # Base 08 - Bright Red
-color10=$color02 # Base 0B - Bright Green
-color11=$color03 # Base 0A - Bright Yellow
-color12=$color04 # Base 0D - Bright Blue
-color13=$color05 # Base 0E - Bright Magenta
-color14=$color06 # Base 0C - Bright Cyan
-color15="c9/cb/ff" # Base 07 - Bright White
-color16="f8/bd/96" # Base 09
-color17="f2/cd/cd" # Base 0F
-color18="1a/18/26" # Base 01
-color19="30/2d/41" # Base 02
-color20="6e/6c/7c" # Base 04
-color21="f5/e0/dc" # Base 06
-color_foreground="d7/da/e0" # Base 05
-color_background="1e/1e/28" # Base 00
+color00="19/17/24" # Base 00 - Black
+color01="eb/6f/92" # Base 08 - Red
+# color02="31/74/8f" # Base 0B - Green
+color02="4a/a1/c4" # Base 0B - Green
+color03="eb/bc/ba" # Base 0A - Yellow
+color04="c4/a7/e7" # Base 0D - Blue
+color05="f6/c1/77" # Base 0E - Magenta
+color06="9c/cf/d8" # Base 0C - Cyan
+color07="e0/de/f4" # Base 05 - White
+color08="26/23/3a" # Base 03 - Bright Black
+color09="$color01" # Base 08 - Bright Red
+color10="$color02" # Base 0B - Bright Green
+color11="$color03" # Base 0A - Bright Yellow
+color12="$color04" # Base 0D - Bright Blue
+color13="$color05" # Base 0E - Bright Magenta
+color14="$color06" # Base 0C - Bright Cyan
+color15="52/4f/67" # Base 07 - Bright White
+color16="f6/c1/77" # Base 09
+color17="52/4f/67" # Base 0F
+color18="1f/1d/2e" # Base 01
+color19="26/23/3a" # Base 02
+color20="90/8c/aa" # Base 04
+color21="e0/de/f4" # Base 06
+color_foreground="e0/de/f4" # Base 05
+color_background="19/17/24" # Base 00
-if [ -n "$TMUX" ]; then
+if [ -z "$TTY" ] && ! TTY=$(tty); then
+ put_template() { true; }
+ put_template_var() { true; }
+ put_template_custom() { true; }
+elif [ -n "$TMUX" ] || [ "${TERM%%[-.]*}" = "tmux" ]; then
# Tell tmux to pass the escape sequences through
# (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324)
- put_template() { printf '\033Ptmux;\033\033]4;%d;rgb:%s\033\033\\\033\\' $@; }
- put_template_var() { printf '\033Ptmux;\033\033]%d;rgb:%s\033\033\\\033\\' $@; }
- put_template_custom() { printf '\033Ptmux;\033\033]%s%s\033\033\\\033\\' $@; }
+ put_template() { printf '\033Ptmux;\033\033]4;%d;rgb:%s\033\033\\\033\\' "$@" > "$TTY"; }
+ put_template_var() { printf '\033Ptmux;\033\033]%d;rgb:%s\033\033\\\033\\' "$@" > "$TTY"; }
+ put_template_custom() { printf '\033Ptmux;\033\033]%s%s\033\033\\\033\\' "$@" > "$TTY"; }
elif [ "${TERM%%[-.]*}" = "screen" ]; then
# GNU screen (screen, screen-256color, screen-256color-bce)
- put_template() { printf '\033P\033]4;%d;rgb:%s\007\033\\' $@; }
- put_template_var() { printf '\033P\033]%d;rgb:%s\007\033\\' $@; }
- put_template_custom() { printf '\033P\033]%s%s\007\033\\' $@; }
+ put_template() { printf '\033P\033]4;%d;rgb:%s\007\033\\' "$@" > "$TTY"; }
+ put_template_var() { printf '\033P\033]%d;rgb:%s\007\033\\' "$@" > "$TTY"; }
+ put_template_custom() { printf '\033P\033]%s%s\007\033\\' "$@" > "$TTY"; }
elif [ "${TERM%%-*}" = "linux" ]; then
- put_template() { [ $1 -lt 16 ] && printf "\e]P%x%s" $1 $(echo $2 | sed 's/\///g'); }
+ put_template() { [ "$1" -lt 16 ] && printf "\e]P%x%s" "$1" "$(echo "$2" | sed 's/\///g')" > "$TTY"; }
put_template_var() { true; }
put_template_custom() { true; }
else
- put_template() { printf '\033]4;%d;rgb:%s\033\\' $@; }
- put_template_var() { printf '\033]%d;rgb:%s\033\\' $@; }
- put_template_custom() { printf '\033]%s%s\033\\' $@; }
+ put_template() { printf '\033]4;%d;rgb:%s\033\\' "$@" > "$TTY"; }
+ put_template_var() { printf '\033]%d;rgb:%s\033\\' "$@" > "$TTY"; }
+ put_template_custom() { printf '\033]%s%s\033\\' "$@" > "$TTY"; }
fi
# 16 color space
-put_template 0 $color00
-put_template 1 $color01
-put_template 2 $color02
-put_template 3 $color03
-put_template 4 $color04
-put_template 5 $color05
-put_template 6 $color06
-put_template 7 $color07
-put_template 8 $color08
-put_template 9 $color09
-put_template 10 $color10
-put_template 11 $color11
-put_template 12 $color12
-put_template 13 $color13
-put_template 14 $color14
-put_template 15 $color15
+put_template 0 "$color00"
+put_template 1 "$color01"
+put_template 2 "$color02"
+put_template 3 "$color03"
+put_template 4 "$color04"
+put_template 5 "$color05"
+put_template 6 "$color06"
+put_template 7 "$color07"
+put_template 8 "$color08"
+put_template 9 "$color09"
+put_template 10 "$color10"
+put_template 11 "$color11"
+put_template 12 "$color12"
+put_template 13 "$color13"
+put_template 14 "$color14"
+put_template 15 "$color15"
# 256 color space
-put_template 16 $color16
-put_template 17 $color17
-put_template 18 $color18
-put_template 19 $color19
-put_template 20 $color20
-put_template 21 $color21
+put_template 16 "$color16"
+put_template 17 "$color17"
+put_template 18 "$color18"
+put_template 19 "$color19"
+put_template 20 "$color20"
+put_template 21 "$color21"
# foreground / background / cursor color
if [ -n "$ITERM_SESSION_ID" ]; then
# iTerm2 proprietary escape codes
- put_template_custom Pg d7dae0 # foreground
- put_template_custom Ph 1e1e28 # background
- put_template_custom Pi d7dae0 # bold color
- put_template_custom Pj 302d41 # selection color
- put_template_custom Pk d7dae0 # selected text color
- put_template_custom Pl d7dae0 # cursor
- put_template_custom Pm 1e1e28 # cursor text
+ put_template_custom Pg e0def4 # foreground
+ put_template_custom Ph 191724 # background
+ put_template_custom Pi e0def4 # bold color
+ put_template_custom Pj 26233a # selection color
+ put_template_custom Pk e0def4 # selected text color
+ put_template_custom Pl e0def4 # cursor
+ put_template_custom Pm 191724 # cursor text
else
- put_template_var 10 $color_foreground
+ put_template_var 10 "$color_foreground"
if [ "$BASE16_SHELL_SET_BACKGROUND" != false ]; then
- put_template_var 11 $color_background
+ put_template_var 11 "$color_background"
if [ "${TERM%%-*}" = "rxvt" ]; then
- put_template_var 708 $color_background # internal border (rxvt)
+ put_template_var 708 "$color_background" # internal border (rxvt)
fi
fi
put_template_custom 12 ";7" # cursor (reverse video)
fi
# clean up
-unset -f put_template
-unset -f put_template_var
-unset -f put_template_custom
+unset put_template
+unset put_template_var
+unset put_template_custom
unset color00
unset color01
unset color02
@@ -128,21 +133,22 @@ unset color_foreground
unset color_background
# Optionally export variables
-if [ -n "$BASE16_SHELL_ENABLE_VARS" ]; then
- export BASE16_COLOR_00_HEX="1e1e28"
- export BASE16_COLOR_01_HEX="1a1826"
- export BASE16_COLOR_02_HEX="302d41"
- export BASE16_COLOR_03_HEX="575268"
- export BASE16_COLOR_04_HEX="6e6c7c"
- export BASE16_COLOR_05_HEX="d7dae0"
- export BASE16_COLOR_06_HEX="f5e0dc"
- export BASE16_COLOR_07_HEX="c9cbff"
- export BASE16_COLOR_08_HEX="f28fad"
- export BASE16_COLOR_09_HEX="f8bd96"
- export BASE16_COLOR_0A_HEX="fae3b0"
- export BASE16_COLOR_0B_HEX="abe9b3"
- export BASE16_COLOR_0C_HEX="b5e8e0"
- export BASE16_COLOR_0D_HEX="96cdfb"
- export BASE16_COLOR_0E_HEX="ddb6f2"
- export BASE16_COLOR_0F_HEX="f2cdcd"
+if [ -n "$TINTED_SHELL_ENABLE_BASE16_VARS" ] || [ -n "$BASE16_SHELL_ENABLE_VARS" ]; then
+ export BASE16_COLOR_00_HEX="191724"
+ export BASE16_COLOR_01_HEX="1f1d2e"
+ export BASE16_COLOR_02_HEX="26233a"
+ export BASE16_COLOR_03_HEX="6e6a86"
+ export BASE16_COLOR_04_HEX="908caa"
+ export BASE16_COLOR_05_HEX="e0def4"
+ export BASE16_COLOR_06_HEX="e0def4"
+ export BASE16_COLOR_07_HEX="524f67"
+ export BASE16_COLOR_08_HEX="eb6f92"
+ export BASE16_COLOR_09_HEX="f6c177"
+ export BASE16_COLOR_0A_HEX="ebbcba"
+ # export BASE16_COLOR_0B_HEX="31748f"
+ export BASE16_COLOR_0B_HEX="4aa1c4"
+ export BASE16_COLOR_0C_HEX="9ccfd8"
+ export BASE16_COLOR_0D_HEX="c4a7e7"
+ export BASE16_COLOR_0E_HEX="f6c177"
+ export BASE16_COLOR_0F_HEX="524f67"
fi
diff --git a/.zshrc b/.zshrc
index ca9f3207..17503e79 100644
--- a/.zshrc
+++ b/.zshrc
@@ -208,6 +208,11 @@ alias ls="${aliases[ls]:-ls} --all"
setopt glob_dots # no special treatment for file names with a leading dot
setopt auto_menu # require an extra TAB press to open the completion menu
+# Highlighting overrides
+# ZSH_HIGHLIGHT_STYLES[command]='fg=cyan,bold'
+# ZSH_HIGHLIGHT_STYLES[alias]='fg=cyan'
+# ZSH_HIGHLIGHT_STYLES[builtin]='fg=cyan'
+
# https://github.com/romkatv/zsh4humans/issues/110#issuecomment-846824056
[[ ! -v functions[command_not_found_handler] ]] || unfunction command_not_found_handler