Browse Source

Added missing FX and named colors to spectrum.

master
Sorin Ionescu 13 years ago
parent
commit
b65195156d
  1. 61
      functions/spectrum.zsh
  2. 6
      init.zsh
  3. 0
      plugins/ant/init.zsh
  4. 0
      plugins/archive/init.zsh
  5. 0
      plugins/autojump/init.zsh
  6. 0
      plugins/brew/init.zsh
  7. 0
      plugins/bundler/init.zsh
  8. 0
      plugins/cake/init.zsh
  9. 0
      plugins/command-not-found/init.zsh
  10. 0
      plugins/compleat/init.zsh
  11. 0
      plugins/dpkg/init.zsh
  12. 0
      plugins/git-flow/init.zsh
  13. 0
      plugins/git/init.zsh
  14. 0
      plugins/github/init.zsh
  15. 0
      plugins/gnu-utils/init.zsh
  16. 0
      plugins/gpg-agent/init.zsh
  17. 2
      plugins/history-substring-search/init.zsh
  18. 0
      plugins/kate/init.zsh
  19. 0
      plugins/leiningen/init.zsh
  20. 0
      plugins/macports/init.zsh
  21. 0
      plugins/node/init.zsh
  22. 0
      plugins/osx/init.zsh
  23. 0
      plugins/pacman/init.zsh
  24. 0
      plugins/perl/init.zsh
  25. 0
      plugins/phing/init.zsh
  26. 0
      plugins/pow/init.zsh
  27. 0
      plugins/python/init.zsh
  28. 0
      plugins/rails/init.zsh
  29. 0
      plugins/rsync/init.zsh
  30. 0
      plugins/ruby/init.zsh
  31. 0
      plugins/screen/init.zsh
  32. 0
      plugins/ssh-agent/init.zsh
  33. 0
      plugins/taskwarrior/init.zsh
  34. 0
      plugins/textmate/init.zsh
  35. 0
      plugins/tmux/init.zsh
  36. 0
      plugins/wakeonlan/init.zsh
  37. 0
      plugins/yum/init.zsh
  38. 0
      plugins/z/init.zsh
  39. 2
      templates/zshrc.zsh

61
functions/spectrum.zsh

@ -1,20 +1,61 @@ @@ -1,20 +1,61 @@
# A script to make using 256 colors in ZSH less painful.
# P.C. Shyamshankar <sykora@lucentbeing.com>
# Copied from http://github.com/sykora/etc/blob/master/zsh/functions/spectrum/
# Sorin Ionescu <sorin.ionescu@gmail.com>
typeset -Ag FX FG BG
FX=(
reset "%{%}"
bold "%{%}" no-bold "%{%}"
italic "%{%}" no-italic "%{%}"
underline "%{%}" no-underline "%{%}"
blink "%{%}" no-blink "%{%}"
reverse "%{%}" no-reverse "%{%}"
none "\e[00m"
normal "\e[22m"
bold "\e[01m" no-bold "\e[22m"
faint "\e[02m" no-faint "\e[22m"
standout "\e[03m" no-standout "\e[23m"
underline "\e[04m" no-underline "\e[24m"
blink "\e[05m" no-blink "\e[25m"
fast-blink "\e[06m" no-fast-blink "\e[25m"
reverse "\e[07m" no-reverse "\e[27m"
conceal "\e[08m" no-conceal "\e[28m"
strikethrough "\e[09m" no-strikethrough "\e[29m"
gothic "\e[20m" no-gothic "\e[22m"
double-underline "\e[21m" no-double-underline "\e[22m"
proportional "\e[26m" no-proportional "\e[50m"
overline "\e[53m" no-overline "\e[55m"
no-border "\e[54m"
border-rectangle "\e[51m" no-border-rectangle "\e[54m"
border-circle "\e[52m" no-border-circle "\e[54m"
no-ideogram-marking "\e[65m"
underline-or-right "\e[60m" no-underline-or-right "\e[65m"
double-underline-or-right "\e[61m" no-double-underline-or-right "\e[65m"
overline-or-left "\e[62m" no-overline-or-left "\e[65m"
double-overline-or-left "\e[63m" no-double-overline-or-left "\e[65m"
stress "\e[64m" no-stress "\e[65m"
font-default "\e[10m"
font-first "\e[11m" no-font-first "\e[10m"
font-second "\e[12m" no-font-second "\e[10m"
font-third "\e[13m" no-font-third "\e[10m"
font-fourth "\e[14m" no-font-fourth "\e[10m"
font-fifth "\e[15m" no-font-fifth "\e[10m"
font-sixth "\e[16m" no-font-sixth "\e[10m"
font-seventh "\e[17m" no-font-seventh "\e[10m"
font-eigth "\e[18m" no-font-eigth "\e[10m"
font-ninth "\e[19m" no-font-ninth "\e[10m"
)
for color in {000..255}; do
FG[$color]="%{[38;5;${color}m%}"
BG[$color]="%{[48;5;${color}m%}"
FG[none]="$FX[none]"
BG[none]="$FX[none]"
colors=(black red green yellow blue magenta cyan white)
for color in {0..255}; do
if (( $color >= 0 )) && (( $color < $#colors )); then
index=$(( $color + 1 ))
FG[$colors[$index]]="\e[38;5;${color}m"
BG[$colors[$index]]="\e[48;5;${color}m"
fi
FG[$color]="\e[38;5;${color}m"
BG[$color]="\e[48;5;${color}m"
done
unset colors color index

6
oh-my-zsh.zsh → init.zsh

@ -14,10 +14,10 @@ autoload -Uz compinit && compinit -i @@ -14,10 +14,10 @@ autoload -Uz compinit && compinit -i
# Source function files.
source "$OMZ/functions/init.zsh"
# Load all plugins defined in ~/.zshrc.
# Source plugins defined in ~/.zshrc.
for plugin in $plugins; do
if [[ -f "$OMZ/plugins/$plugin/$plugin.plugin.zsh" ]]; then
source "$OMZ/plugins/$plugin/$plugin.plugin.zsh"
if [[ -f "$OMZ/plugins/$plugin/init.zsh" ]]; then
source "$OMZ/plugins/$plugin/init.zsh"
fi
done

0
plugins/ant/ant.plugin.zsh → plugins/ant/init.zsh

0
plugins/archive/archive.plugin.zsh → plugins/archive/init.zsh

0
plugins/autojump/autojump.plugin.zsh → plugins/autojump/init.zsh

0
plugins/brew/brew.plugin.zsh → plugins/brew/init.zsh

0
plugins/bundler/bundler.plugin.zsh → plugins/bundler/init.zsh

0
plugins/cake/cake.plugin.zsh → plugins/cake/init.zsh

0
plugins/command-not-found/command-not-found.plugin.zsh → plugins/command-not-found/init.zsh

0
plugins/compleat/compleat.plugin.zsh → plugins/compleat/init.zsh

0
plugins/dpkg/dpkg.plugin.zsh → plugins/dpkg/init.zsh

0
plugins/git-flow/git-flow.plugin.zsh → plugins/git-flow/init.zsh

0
plugins/git/git.plugin.zsh → plugins/git/init.zsh

0
plugins/github/github.plugin.zsh → plugins/github/init.zsh

0
plugins/gnu-utils/gnu-utils.plugin.zsh → plugins/gnu-utils/init.zsh

0
plugins/gpg-agent/gpg-agent.plugin.zsh → plugins/gpg-agent/init.zsh

2
plugins/history-substring-search/history-substring-search.plugin.zsh → plugins/history-substring-search/init.zsh

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
# This file integrates the history-substring-search script into oh-my-zsh.
source "${0:r:r}.zsh"
source "${0:h}/history-substring-search.zsh"
if check-bool "$CASE_SENSITIVE"; then
unset HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS

0
plugins/kate/kate.plugin.zsh → plugins/kate/init.zsh

0
plugins/leiningen/leiningen.plugin.zsh → plugins/leiningen/init.zsh

0
plugins/macports/macports.plugin.zsh → plugins/macports/init.zsh

0
plugins/node/node.plugin.zsh → plugins/node/init.zsh

0
plugins/osx/osx.plugin.zsh → plugins/osx/init.zsh

0
plugins/pacman/pacman.plugin.zsh → plugins/pacman/init.zsh

0
plugins/perl/perl.plugin.zsh → plugins/perl/init.zsh

0
plugins/phing/phing.plugin.zsh → plugins/phing/init.zsh

0
plugins/pow/pow.plugin.zsh → plugins/pow/init.zsh

0
plugins/python/python.plugin.zsh → plugins/python/init.zsh

0
plugins/rails/rails.plugin.zsh → plugins/rails/init.zsh

0
plugins/rsync/rsync.plugin.zsh → plugins/rsync/init.zsh

0
plugins/ruby/ruby.plugin.zsh → plugins/ruby/init.zsh

0
plugins/screen/screen.plugin.zsh → plugins/screen/init.zsh

0
plugins/ssh-agent/ssh-agent.plugin.zsh → plugins/ssh-agent/init.zsh

0
plugins/taskwarrior/taskwarrior.plugin.zsh → plugins/taskwarrior/init.zsh

0
plugins/textmate/textmate.plugin.zsh → plugins/textmate/init.zsh

0
plugins/tmux/tmux.plugin.zsh → plugins/tmux/init.zsh

0
plugins/wakeonlan/wakeonlan.plugin.zsh → plugins/wakeonlan/init.zsh

0
plugins/yum/yum.plugin.zsh → plugins/yum/init.zsh

0
plugins/z/z.plugin.zsh → plugins/z/init.zsh

2
templates/zshrc.template.zsh → templates/zshrc.zsh

@ -24,7 +24,7 @@ COMPLETION_INDICATOR='false' @@ -24,7 +24,7 @@ COMPLETION_INDICATOR='false'
plugins=(git)
# This will make you scream: OH MY ZSH!
source "$OMZ/oh-my-zsh.zsh"
source "$OMZ/init.zsh"
# Load the prompt theme (type prompt -l to list all themes).
# Setting it to 'random' loads a random theme.
Loading…
Cancel
Save