Merge remote-tracking branch 'origin/theming'

Merging in the refactored theming since we no longer rely on ZSH_THEME variable anymore

Conflicts:
	oh-my-zsh.zsh
	templates/zshrc.arch-zsh-template
	templates/zshrc.zsh-template
This commit is contained in:
Simon Gomizelj 2011-12-02 08:24:08 -05:00
commit f838ca5e1f
4 changed files with 45 additions and 19 deletions

11
lib/theming.zsh Normal file
View file

@ -0,0 +1,11 @@
set_theme() {
source "$ZSH/themes/$1.zsh-theme"
}
random_theme() {
local themes
themes=($ZSH/themes/*zsh-theme)
source "$themes[$RANDOM%$#themes+1]"
}
# compdef "_files -g '*.zsh'" set_theme

View file

@ -44,21 +44,6 @@ for plugin ($plugins); do
fi fi
done done
local ZSH_THEME local theme
zstyle -a :omz:style theme ZSH_THEME zstyle -a :omz:style theme theme
set_theme theme
# Load the theme
if [ "$ZSH_THEME" = "random" ]
then
themes=($ZSH/themes/*zsh-theme)
N=${#themes[@]}
((N=(RANDOM%N)+1))
RANDOM_THEME=${themes[$N]}
source "$RANDOM_THEME"
echo "[oh-my-zsh] Random theme '$RANDOM_THEME' loaded..."
else
if [ ! "$ZSH_THEME" = "" ]
then
source "$ZSH/themes/$ZSH_THEME.zsh-theme"
fi
fi

View file

@ -6,7 +6,7 @@ fi
# Functions ################################################################# # Functions #################################################################
# https://github.com/dbb # https://github.com/dbb
# empty_gh [NAME_OF_REPO] # empty_gh [NAME_OF_REPO]

View file

@ -0,0 +1,30 @@
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
# Comment this out to disable weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"
# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment following line if you want red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="true"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git)
source $ZSH/oh-my-zsh.zsh
# Load a theme
# Look in $ZSH/themes/
set_theme "robbyrussell"
# random_theme
# Customize to your needs...