|
| 1 | +#!/usr/bin/env sh |
| 2 | +# tinted-shell (https://github.com/tinted-theming/tinted-shell) |
| 3 | +# Scheme name: Penumbra Dark Contrast Plus Plus |
| 4 | +# Scheme author: Zachary Weiss (https://github.com/zacharyweiss) |
| 5 | +# Template author: Tinted Theming (https://github.com/tinted-theming) |
| 6 | +export BASE16_THEME=penumbra-dark-contrast-plus-plus |
| 7 | + |
| 8 | +color00="0d/0f/13" # Base 00 - Black |
| 9 | +color01="f5/8c/81" # Base 08 - Red |
| 10 | +color02="54/c7/94" # Base 0B - Green |
| 11 | +color03="a9/b8/52" # Base 0A - Yellow |
| 12 | +color04="6e/b2/fd" # Base 0D - Blue |
| 13 | +color05="b6/9c/f6" # Base 0E - Magenta |
| 14 | +color06="00/c4/d7" # Base 0C - Cyan |
| 15 | +color07="de/de/de" # Base 05 - White |
| 16 | +color08="3e/40/44" # Base 03 - Bright Black |
| 17 | +color09="$color01" # Base 08 - Bright Red |
| 18 | +color10="$color02" # Base 0B - Bright Green |
| 19 | +color11="$color03" # Base 0A - Bright Yellow |
| 20 | +color12="$color04" # Base 0D - Bright Blue |
| 21 | +color13="$color05" # Base 0E - Bright Magenta |
| 22 | +color14="$color06" # Base 0C - Bright Cyan |
| 23 | +color15="ff/fd/fb" # Base 07 - Bright White |
| 24 | +color16="e0/9f/47" # Base 09 |
| 25 | +color17="e5/8c/c5" # Base 0F |
| 26 | +color18="18/1b/1f" # Base 01 |
| 27 | +color19="3e/40/44" # Base 02 |
| 28 | +color20="ae/ae/ae" # Base 04 |
| 29 | +color21="ff/f7/ed" # Base 06 |
| 30 | +color_foreground="de/de/de" # Base 05 |
| 31 | +color_background="0d/0f/13" # Base 00 |
| 32 | + |
| 33 | +if [ -z "$TTY" ] && ! TTY=$(tty); then |
| 34 | + put_template() { true; } |
| 35 | + put_template_var() { true; } |
| 36 | + put_template_custom() { true; } |
| 37 | +elif [ -n "$TMUX" ] || [ "${TERM%%[-.]*}" = "tmux" ]; then |
| 38 | + # Tell tmux to pass the escape sequences through |
| 39 | + # (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324) |
| 40 | + put_template() { printf '\033Ptmux;\033\033]4;%d;rgb:%s\033\033\\\033\\' "$@" > "$TTY"; } |
| 41 | + put_template_var() { printf '\033Ptmux;\033\033]%d;rgb:%s\033\033\\\033\\' "$@" > "$TTY"; } |
| 42 | + put_template_custom() { printf '\033Ptmux;\033\033]%s%s\033\033\\\033\\' "$@" > "$TTY"; } |
| 43 | +elif [ "${TERM%%[-.]*}" = "screen" ]; then |
| 44 | + # GNU screen (screen, screen-256color, screen-256color-bce) |
| 45 | + put_template() { printf '\033P\033]4;%d;rgb:%s\007\033\\' "$@" > "$TTY"; } |
| 46 | + put_template_var() { printf '\033P\033]%d;rgb:%s\007\033\\' "$@" > "$TTY"; } |
| 47 | + put_template_custom() { printf '\033P\033]%s%s\007\033\\' "$@" > "$TTY"; } |
| 48 | +elif [ "${TERM%%-*}" = "linux" ]; then |
| 49 | + put_template() { [ "$1" -lt 16 ] && printf "\e]P%x%s" "$1" "$(echo "$2" | sed 's/\///g')" > "$TTY"; } |
| 50 | + put_template_var() { true; } |
| 51 | + put_template_custom() { true; } |
| 52 | +else |
| 53 | + put_template() { printf '\033]4;%d;rgb:%s\033\\' "$@" > "$TTY"; } |
| 54 | + put_template_var() { printf '\033]%d;rgb:%s\033\\' "$@" > "$TTY"; } |
| 55 | + put_template_custom() { printf '\033]%s%s\033\\' "$@" > "$TTY"; } |
| 56 | +fi |
| 57 | + |
| 58 | +# 16 color space |
| 59 | +put_template 0 "$color00" |
| 60 | +put_template 1 "$color01" |
| 61 | +put_template 2 "$color02" |
| 62 | +put_template 3 "$color03" |
| 63 | +put_template 4 "$color04" |
| 64 | +put_template 5 "$color05" |
| 65 | +put_template 6 "$color06" |
| 66 | +put_template 7 "$color07" |
| 67 | +put_template 8 "$color08" |
| 68 | +put_template 9 "$color09" |
| 69 | +put_template 10 "$color10" |
| 70 | +put_template 11 "$color11" |
| 71 | +put_template 12 "$color12" |
| 72 | +put_template 13 "$color13" |
| 73 | +put_template 14 "$color14" |
| 74 | +put_template 15 "$color15" |
| 75 | + |
| 76 | +# 256 color space |
| 77 | +put_template 16 "$color16" |
| 78 | +put_template 17 "$color17" |
| 79 | +put_template 18 "$color18" |
| 80 | +put_template 19 "$color19" |
| 81 | +put_template 20 "$color20" |
| 82 | +put_template 21 "$color21" |
| 83 | + |
| 84 | +# foreground / background / cursor color |
| 85 | +if [ -n "$ITERM_SESSION_ID" ]; then |
| 86 | + # iTerm2 proprietary escape codes |
| 87 | + put_template_custom Pg dedede # foreground |
| 88 | + put_template_custom Ph 0d0f13 # background |
| 89 | + put_template_custom Pi dedede # bold color |
| 90 | + put_template_custom Pj 3e4044 # selection color |
| 91 | + put_template_custom Pk dedede # selected text color |
| 92 | + put_template_custom Pl dedede # cursor |
| 93 | + put_template_custom Pm 0d0f13 # cursor text |
| 94 | +else |
| 95 | + put_template_var 10 "$color_foreground" |
| 96 | + if [ "$BASE16_SHELL_SET_BACKGROUND" != false ]; then |
| 97 | + put_template_var 11 "$color_background" |
| 98 | + if [ "${TERM%%-*}" = "rxvt" ]; then |
| 99 | + put_template_var 708 "$color_background" # internal border (rxvt) |
| 100 | + fi |
| 101 | + fi |
| 102 | + put_template_custom 12 ";7" # cursor (reverse video) |
| 103 | +fi |
| 104 | + |
| 105 | +# clean up |
| 106 | +unset put_template |
| 107 | +unset put_template_var |
| 108 | +unset put_template_custom |
| 109 | +unset color00 |
| 110 | +unset color01 |
| 111 | +unset color02 |
| 112 | +unset color03 |
| 113 | +unset color04 |
| 114 | +unset color05 |
| 115 | +unset color06 |
| 116 | +unset color07 |
| 117 | +unset color08 |
| 118 | +unset color09 |
| 119 | +unset color10 |
| 120 | +unset color11 |
| 121 | +unset color12 |
| 122 | +unset color13 |
| 123 | +unset color14 |
| 124 | +unset color15 |
| 125 | +unset color16 |
| 126 | +unset color17 |
| 127 | +unset color18 |
| 128 | +unset color19 |
| 129 | +unset color20 |
| 130 | +unset color21 |
| 131 | +unset color_foreground |
| 132 | +unset color_background |
| 133 | + |
| 134 | +# Optionally export variables |
| 135 | +if [ -n "$TINTED_SHELL_ENABLE_BASE16_VARS" ] || [ -n "$BASE16_SHELL_ENABLE_VARS" ]; then |
| 136 | + export BASE16_COLOR_00_HEX="0d0f13" |
| 137 | + export BASE16_COLOR_01_HEX="181b1f" |
| 138 | + export BASE16_COLOR_02_HEX="3e4044" |
| 139 | + export BASE16_COLOR_03_HEX="636363" |
| 140 | + export BASE16_COLOR_04_HEX="aeaeae" |
| 141 | + export BASE16_COLOR_05_HEX="dedede" |
| 142 | + export BASE16_COLOR_06_HEX="fff7ed" |
| 143 | + export BASE16_COLOR_07_HEX="fffdfb" |
| 144 | + export BASE16_COLOR_08_HEX="f58c81" |
| 145 | + export BASE16_COLOR_09_HEX="e09f47" |
| 146 | + export BASE16_COLOR_0A_HEX="a9b852" |
| 147 | + export BASE16_COLOR_0B_HEX="54c794" |
| 148 | + export BASE16_COLOR_0C_HEX="00c4d7" |
| 149 | + export BASE16_COLOR_0D_HEX="6eb2fd" |
| 150 | + export BASE16_COLOR_0E_HEX="b69cf6" |
| 151 | + export BASE16_COLOR_0F_HEX="e58cc5" |
| 152 | +fi |
0 commit comments