mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
use zgen
This commit is contained in:
parent
6fcb6b0750
commit
901fd66a30
8 changed files with 49 additions and 54 deletions
9
.gitmodules
vendored
9
.gitmodules
vendored
|
@ -1,6 +1,3 @@
|
||||||
[submodule "oh-my-zsh"]
|
[submodule "zgen"]
|
||||||
path = oh-my-zsh
|
path = zgen
|
||||||
url = https://github.com/robbyrussell/oh-my-zsh.git
|
url = https://github.com/tarjoilija/zgen.git
|
||||||
[submodule "fast-syntax-highlighting"]
|
|
||||||
path = fast-syntax-highlighting
|
|
||||||
url = https://github.com/zdharma/fast-syntax-highlighting.git
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 8ac992d99c5da68fe729cb6fb365622d36c9e957
|
|
|
@ -1,38 +0,0 @@
|
||||||
#!/usr/bin/env zsh
|
|
||||||
|
|
||||||
configure_oh_my_zsh() {
|
|
||||||
export ZSH="$DOTFILES_PATH/oh-my-zsh"
|
|
||||||
|
|
||||||
# see https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
|
|
||||||
export ZSH_THEME="agnoster"
|
|
||||||
|
|
||||||
# use hyphen-insensitive completion (makes `_` and `-` interchangeable)
|
|
||||||
export HYPHEN_INSENSITIVE="true"
|
|
||||||
|
|
||||||
# enable command auto-correction
|
|
||||||
export ENABLE_CORRECTION="true"
|
|
||||||
|
|
||||||
# display red dots while waiting for completion
|
|
||||||
export COMPLETION_WAITING_DOTS="true"
|
|
||||||
|
|
||||||
# disable marking untracked files under VCS as dirty (this makes repository
|
|
||||||
# status check for large repositories faster)
|
|
||||||
export DISABLE_UNTRACKED_FILES_DIRTY="true"
|
|
||||||
|
|
||||||
# command execution time stamp shown in the history
|
|
||||||
export HIST_STAMPS="mm/dd/yyyy"
|
|
||||||
|
|
||||||
# https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins
|
|
||||||
plugins=(
|
|
||||||
git
|
|
||||||
common-aliases
|
|
||||||
extract
|
|
||||||
)
|
|
||||||
|
|
||||||
if is_linux; then
|
|
||||||
plugins+=(command-not-found)
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
configure_oh_my_zsh
|
|
||||||
source "$ZSH/oh-my-zsh.sh"
|
|
|
@ -1,11 +1,5 @@
|
||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
configure_syntax_highlighting() {
|
|
||||||
# set directory for compiled theme files
|
|
||||||
FAST_WORK_DIR="$DOTFILES_PATH/cache"
|
|
||||||
source "$DOTFILES_PATH/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh"
|
|
||||||
}
|
|
||||||
|
|
||||||
configure_dircolors() {
|
configure_dircolors() {
|
||||||
[[ -f ~/.dircolors ]] && eval "$(dircolors ~/.dircolors)"
|
[[ -f ~/.dircolors ]] && eval "$(dircolors ~/.dircolors)"
|
||||||
[[ -z "$LS_COLORS" ]] && eval "$(dircolors -b)"
|
[[ -z "$LS_COLORS" ]] && eval "$(dircolors -b)"
|
||||||
|
@ -13,5 +7,4 @@ configure_dircolors() {
|
||||||
zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}"
|
zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}"
|
||||||
}
|
}
|
||||||
|
|
||||||
configure_syntax_highlighting
|
|
||||||
configure_dircolors
|
configure_dircolors
|
||||||
|
|
44
lib/zgen.zsh
Normal file
44
lib/zgen.zsh
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
configure_oh_my_zsh() {
|
||||||
|
# use hyphen-insensitive completion (makes `_` and `-` interchangeable)
|
||||||
|
HYPHEN_INSENSITIVE="true"
|
||||||
|
|
||||||
|
# enable command auto-correction
|
||||||
|
ENABLE_CORRECTION="true"
|
||||||
|
|
||||||
|
# display red dots while waiting for completion
|
||||||
|
COMPLETION_WAITING_DOTS="true"
|
||||||
|
|
||||||
|
# disable marking untracked files under VCS as dirty (this makes repository
|
||||||
|
# status check for large repositories faster)
|
||||||
|
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||||
|
|
||||||
|
# command execution time stamp shown in the history
|
||||||
|
HIST_STAMPS="mm/dd/yyyy"
|
||||||
|
}
|
||||||
|
|
||||||
|
configure_syntax_highlighting() {
|
||||||
|
FAST_WORK_DIR="$DOTFILES_PATH/cache"
|
||||||
|
}
|
||||||
|
|
||||||
|
configure_oh_my_zsh
|
||||||
|
configure_syntax_highlighting
|
||||||
|
|
||||||
|
source "$DOTFILES_PATH/zgen/zgen.zsh"
|
||||||
|
|
||||||
|
if ! zgen saved; then
|
||||||
|
zgen oh-my-zsh
|
||||||
|
|
||||||
|
zgen oh-my-zsh plugins/git
|
||||||
|
zgen oh-my-zsh plugins/common-aliases
|
||||||
|
zgen oh-my-zsh plugins/extract
|
||||||
|
zgen oh-my-zsh plugins/fasd
|
||||||
|
is_linux && zgen oh-my-zsh plugins/command-not-found
|
||||||
|
|
||||||
|
zgen load zdharma/fast-syntax-highlighting
|
||||||
|
|
||||||
|
zgen oh-my-zsh themes/agnoster
|
||||||
|
|
||||||
|
zgen save
|
||||||
|
fi
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 05b617066ba5a37ef0c533385efd6e232a387b8f
|
|
1
zgen
Submodule
1
zgen
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 0b669d2d0dcf788b4c81a7a30b4fa41dfbf7d1a7
|
2
zshrc
2
zshrc
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
DOTFILES_PATH="${0:h}"
|
DOTFILES_PATH="${0:h}"
|
||||||
|
|
||||||
for script in oh-my-zsh aliases widgets theme; do
|
for script in zgen aliases widgets theme; do
|
||||||
source "$DOTFILES_PATH/lib/$script.zsh"
|
source "$DOTFILES_PATH/lib/$script.zsh"
|
||||||
source_if_exists "$DOTFILES_PATH/custom/$script.zsh"
|
source_if_exists "$DOTFILES_PATH/custom/$script.zsh"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue