Migrate to ZIM

Moves init/config files to main directory, instead of in submodule
This commit is contained in:
Adam Goldsmith 2016-01-22 19:06:27 -05:00
parent fda8113e89
commit 659855d19a
7 changed files with 131 additions and 4 deletions

6
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule ".zprezto"]
path = .zprezto
url = http://adamgoldsmith.name/cgit/prezto.git
[submodule ".zim"]
path = .zim
url = http://adamgoldsmith.name/cgit/zim.git

1
.zim Submodule

@ -0,0 +1 @@
Subproject commit a51d94b91d52cc25503ed6d1c0f685d0ff71c0b3

27
.zimrc Normal file
View File

@ -0,0 +1,27 @@
#-*- mode: sh; -*-
## Zim settings
# Select what modules you would like enabled.
# The second line of modules may depend on options set by modules in the first line.
# These dependencies are noted on the respective module's README.md.
zmodules=(directory environment git history input utility custom \
syntax-highlighting prompt git completion)
## Prompt
# Set your desired prompt here
zprompt_theme='fred'
## Utility
# Uncomment to enable command correction prompts; 'setopt CORRECT'
# See: http://zsh.sourceforge.net/Doc/Release/Options.html#Input_002fOutput
zcorrection='true'
## Syntax-Highlighting
# This determines what highlighters will be used with the completion module.
# Documentation of the highlighters can be found here:
# https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md
zhighlighters=(main brackets)
## SSH
# Load these ssh identities with the ssh module
zssh_ids=(id_rsa)

47
.zlogin Normal file
View File

@ -0,0 +1,47 @@
#-*- mode: sh; -*-
# startup file read in interactive login shells
# The following code helps us by optimizing the existing framework.
# This includes zcompile, zcompdump, etc.
(
# Function to determine the need of a zcompile. If the .zwc file
# does not exist, or the base file is newer, we need to compile.
# These jobs are asynchronous, and will not impact the interactive shell
zcompare() {
if [[ -s ${1} && ( ! -s ${1}.zwc || ${1} -nt ${1}.zwc) ]]; then
zcompile ${1}
fi
}
zim_mods=${ZDOTDIR:-${HOME}}/.zim/modules
setopt EXTENDED_GLOB
# zcompile the completion cache; siginificant speedup.
zcompare ${ZDOTDIR:-${HOME}}/.zcompdump
# zcompile .zshrc
zcompare ${ZDOTDIR:-${HOME}}/.zshrc
# zcompile some light module init scripts
zcompare ${zim_mods}/git/init.zsh
zcompare ${zim_mods}/utility/init.zsh
zcompare ${zim_mods}/pacman/init.zsh
zcompare ${zim_mods}/spectrum/init.zsh
zcompare ${zim_mods}/completion/init.zsh
# zcompile all .zsh files in the custom module
for file in ${zim_mods}/custom/**/*.zsh; do
zcompare ${file}
done
# syntax-highlighting
for file in ${zim_mods}/syntax-highlighting/external/highlighters/**/*.zsh; do
zcompare ${file}
done
zcompare ${zim_mods}/syntax-highlighting/external/zsh-syntax-highlighting.zsh
# zsh-histery-substring-search
zcompare ${zim_mods}/history-substring-search/external/zsh-history-substring-search.zsh
) &!

@ -1 +0,0 @@
Subproject commit 702f6593734afae7c219b78b3db15a11f109f10b

9
.zshenv Normal file
View File

@ -0,0 +1,9 @@
#-*- mode: sh; -*-
# Environment variables
export ARDUINO_DIR="/usr/share/arduino"
export ARDMK_DIR="$HOME/Programs/Arduino-Makefile"
export STEAMAPPS="$HOME/.local/share/Steam/steamapps/common"
export SCHOOL="$HOME/Documents/WPI"
export QT_STYLE_OVERRIDE=gtk
export ALTERNATE_EDITOR=""
export TERMINAL=roxterm

44
.zshrc Normal file
View File

@ -0,0 +1,44 @@
#-*- mode: sh; -*-
# User configuration sourced by interactive shells
# Source zim
if [[ -s ${ZDOTDIR:-${HOME}}/.zim/init.zsh ]]; then
source ${ZDOTDIR:-${HOME}}/.zim/init.zsh
fi
# Command Specific Aliases
for i in $HOME/.aliases/command-specific/*
do
if hash $(basename $i) 2>/dev/null
then
source $i
fi
done
# General Aliases
source $HOME/.aliases/general
# Various Options
CORRECT_IGNORE="_*"
stty -ixon #disable XON/XOFF, which breaks C-s
# Keybindings
my-backward-kill-word () {
local WORDCHARS=${WORDCHARS/\//}
zle backward-kill-word
}
zle -N my-backward-kill-word
bindkey '^H' my-backward-kill-word
# Inserts 'sudo ' at the beginning of the line.
function prepend-sudo() {
if [[ "$BUFFER" != su(do|)\ * ]]; then
BUFFER="sudo $BUFFER"
(( CURSOR += 5 ))
fi
}
zle -N prepend-sudo
bindkey "^X^S" prepend-sudo
#load fasd if it exists
hash fasd 2>/dev/null && eval "$(fasd --init auto)"