switch to zgen

Fri, 22 Jan 2016 16:12:49 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Fri, 22 Jan 2016 16:12:49 -0500
changeset 241
599f0e8cfb32
parent 240
18f78b36f003
child 242
8724c8ed6150

switch to zgen

.homedir-setup.rb file | annotate | diff | comparison | revisions
.zshrc file | annotate | diff | comparison | revisions
--- a/.homedir-setup.rb
+++ b/.homedir-setup.rb
@@ -53,15 +53,14 @@ end
 
 
 def setup
-  # oh-my-zsh {{{
-    # some custom zsh files are already in .oh-my-zsh.cust
-    if Dir.exists?('.oh-my-zsh/.git')
-      puts "oh-my-zsh already installed"
+  # zgen {{{
+    if Dir.exists?('.zgen')
+      puts "zgen already installed"
     else
-      puts "Installing oh-my-zsh..."
+      puts "Installing zgen..."
 
       do_cmds \
-        'git clone git://github.com/robbyrussell/oh-my-zsh.git .oh-my-zsh'
+        'git clone https://github.com/tarjoilija/zgen.git .zgen'
     end
   # }}}
 
@@ -72,8 +71,8 @@ def setup
       puts "Installing plenv..."
 
       do_cmds \
-        'git clone git://github.com/tokuhirom/plenv.git .plenv',
-        'git clone git://github.com/tokuhirom/Perl-Build.git .plenv/plugins/perl-build/'
+        'git clone https://github.com/tokuhirom/plenv.git .plenv',
+        'git clone https://github.com/tokuhirom/Perl-Build.git .plenv/plugins/perl-build/'
     end
   # }}}
 
@@ -103,8 +102,7 @@ def setup
 end
 
 def update
-  [
-    '.oh-my-zsh',
+  [ '.zgen',
     '.plenv',
     '.plenv/plugins/perl-build',
     '.rbenv',
--- a/.zshrc
+++ b/.zshrc
@@ -1,32 +1,30 @@
-# Path to your oh-my-zsh installation.
-export ZSH=$HOME/.oh-my-zsh
-
-ZSH_THEME="mhoward"
-ZSH_CUSTOM=~/.oh-my-zsh.cust
+# Version/environment management tools to load
+envthings=(plenv rbenv ndenv)
 
-DISABLE_AUTO_UPDATE="true"
-# DISABLE_UPDATE_PROMPT="true"
+# DISABLE_AUTO_TITLE="true"
+COMPLETION_WAITING_DOTS="true"
+DISABLE_UNTRACKED_FILES_DIRTY="true"
 
-plugins=( common-aliases gitfast )
-envthings=( plenv rbenv ndenv )
+typeset -U path
 
 if [ -f ~/.zshrc.local-pre ]; then
   source ~/.zshrc.local-pre
 fi
 
-# Uncomment the following line to disable auto-setting terminal title.
-# DISABLE_AUTO_TITLE="true"
-
-COMPLETION_WAITING_DOTS="true"
+if [ -f ~/.zgen/zgen.zsh ]; then
+  source ~/.zgen/zgen.zsh
 
-# Uncomment the following line if you want to disable marking untracked files
-# under VCS as dirty. This makes repository status check for large repositories
-# much, much faster.
-# DISABLE_UNTRACKED_FILES_DIRTY="true"
+  if ! zgen saved; then
+    zgen oh-my-zsh
+    zgen oh-my-zsh plugins/common-aliases
+    zgen oh-my-zsh plugins/gitfast
 
-typeset -U path
+    zgen load zsh-users/zsh-syntax-highlighing
+    zgen load ~/.oh-my-zsh.cust/themes/mhoward
 
-source $ZSH/oh-my-zsh.sh
+    zgen save
+  fi
+fi
 
 # User configuration
 path=( "$HOME/bin" "$path[@]" )

mercurial