Files

49 lines
1.3 KiB
Bash
Executable File

#!/bin/sh
# Setzt die mwxcol-Palette per Escape-Sequenz in der LAUFENDEN iTerm2-Session.
# Nur zum Ansehen: nichts wird gespeichert, ein neuer Tab hat wieder die alten
# Farben. Für dauerhaft siehe mwxcol.itermcolors + README.
set -eu
[ "${TERM_PROGRAM:-}" = "iTerm.app" ] || {
echo "Das ist keine iTerm2-Session (TERM_PROGRAM=${TERM_PROGRAM:-leer})." >&2
exit 1
}
set_color() { printf '\033]1337;SetColors=%s=%s\a' "$1" "$2"; }
set_color black 444455
set_color red F38BA8
set_color green 94E2D5
set_color yellow F9E2AF
set_color blue B4BEFE
set_color magenta CBA6F7
set_color cyan 94DAE0
set_color white AAAABB
set_color br_black 777788
set_color br_red F7B5C8
set_color br_green B8EAE1
set_color br_yellow FCEECB
set_color br_blue CDD4FE
set_color br_magenta F5B2F7
set_color br_cyan B8E7EB
set_color br_white F0F0EA
set_color fg F0F0EA
set_color bg 252528
set_color bold F0F0EA
set_color link B4BEFE
set_color curbg F38BA8
set_color curfg 252528
set_color selbg 444455
set_color selfg F0F0EA
echo "mwxcol-Vorschau aktiv — nur diese Session."
echo
i=0
while [ $i -lt 8 ]; do printf '\033[4%dm \033[0m' $i; i=$((i+1)); done
printf ' normal\n'
i=0
while [ $i -lt 8 ]; do printf '\033[10%dm \033[0m' $i; i=$((i+1)); done
printf ' bright\n'