From 978fd3f4cefc90936f1caf12bc4c973a95b13a0c Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sat, 25 Apr 2015 23:00:03 -0400 Subject: [PATCH] initial config --- .gitmodules | 3 + modules/prompt/external/fred | 1 + modules/prompt/functions/prompt_fred_setup | 1 + runcoms/zlogout | 3 +- runcoms/zpreztorc | 187 +++++++++------------ runcoms/zprofile | 8 +- runcoms/zshrc | 37 +++- 7 files changed, 125 insertions(+), 115 deletions(-) create mode 160000 modules/prompt/external/fred create mode 120000 modules/prompt/functions/prompt_fred_setup diff --git a/.gitmodules b/.gitmodules index cb8f419..7cdea75 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "modules/prompt/functions/pure"] path = modules/prompt/external/pure url = https://github.com/sindresorhus/pure.git +[submodule "modules/prompt/external/fred"] + path = modules/prompt/external/fred + url = ssh://ag/srv/git/prezto-fred-prompt.git diff --git a/modules/prompt/external/fred b/modules/prompt/external/fred new file mode 160000 index 0000000..2661815 --- /dev/null +++ b/modules/prompt/external/fred @@ -0,0 +1 @@ +Subproject commit 2661815216c138cddea6a867483b3de2ba62eaaf diff --git a/modules/prompt/functions/prompt_fred_setup b/modules/prompt/functions/prompt_fred_setup new file mode 120000 index 0000000..72d2b8f --- /dev/null +++ b/modules/prompt/functions/prompt_fred_setup @@ -0,0 +1 @@ +../external/fred/prompt_fred_setup \ No newline at end of file diff --git a/runcoms/zlogout b/runcoms/zlogout index 7c27e88..1dda216 100644 --- a/runcoms/zlogout +++ b/runcoms/zlogout @@ -8,6 +8,5 @@ # Print the message. cat <<-EOF -Thank you. Come again! - -- Dr. Apu Nahasapeemapetilon +Good bye. EOF diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc index 4778944..53f201f 100644 --- a/runcoms/zpreztorc +++ b/runcoms/zpreztorc @@ -1,26 +1,9 @@ -# -# Sets Prezto options. -# -# Authors: -# Sorin Ionescu -# - -# -# General -# - -# Set case-sensitivity for completion, history lookup, etc. -# zstyle ':prezto:*:*' case-sensitive 'yes' +#-*- mode: sh; -*- +## General # Color output (auto set to 'no' on dumb terminals). zstyle ':prezto:*:*' color 'yes' -# Set the Zsh modules to load (man zshmodules). -# zstyle ':prezto:load' zmodule 'attr' 'stat' - -# Set the Zsh functions to load (man zshcontrib). -# zstyle ':prezto:load' zfunction 'zargs' 'zmv' - # Set the Prezto modules to load (browse modules). # The order matters. zstyle ':prezto:load' pmodule \ @@ -32,126 +15,116 @@ zstyle ':prezto:load' pmodule \ 'spectrum' \ 'utility' \ 'completion' \ + 'git'\ + 'tmux'\ + 'gpg'\ + 'command-not-found'\ + 'syntax-highlighting'\ 'prompt' -# -# Editor -# +# Set the prompt theme to load. +zstyle ':prezto:module:prompt' theme 'fred' + + +## Editor # Set the key mapping style to 'emacs' or 'vi'. zstyle ':prezto:module:editor' key-bindings 'emacs' # Auto convert .... to ../.. -# zstyle ':prezto:module:editor' dot-expansion 'yes' +zstyle ':prezto:module:editor' dot-expansion 'yes' + +# Set the SSH identities to load into the agent. +zstyle ':prezto:module:ssh:load' identities 'id_rsa' 'id_rsa2' 'id_github' + + +## Terminal + +# Auto set the tab and window titles. +zstyle ':prezto:module:terminal' auto-title 'yes' + +# Set the window title format. +#zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s' + +# Set the tab title format. +#zstyle ':prezto:module:terminal:tab-title' format '%m: %s' + + +## Tmux + +# Auto start a session when Zsh is launched in a local terminal. +#zstyle ':prezto:module:tmux:auto-start' local 'yes' + +# Auto start a session when Zsh is launched in a SSH connection. +zstyle ':prezto:module:tmux:auto-start' remote 'yes' + +# Integrate with iTerm2. +#zstyle ':prezto:module:tmux:iterm' integrate 'yes' + + +## Syntax Highlighting + +# Set syntax highlighters. +# By default, only the main highlighter is enabled. +zstyle ':prezto:module:syntax-highlighting' highlighters \ + 'main' \ + 'brackets' \ + 'pattern' +# 'cursor'\ +# 'root' + +# Set syntax highlighting styles. +zstyle ':prezto:module:syntax-highlighting' styles \ + 'builtin' 'fg=yellow'\ + 'command' 'fg=yellow'\ + 'function' 'fg=yellow' + + +## Unused + +# +# General +# + +# Set case-sensitivity for completion, history lookup, etc. +#zstyle ':prezto:*:*' case-sensitive 'yes' + +# Set the Zsh modules to load (man zshmodules). +#zstyle ':prezto:load' zmodule 'attr' 'stat' + +# Set the Zsh functions to load (man zshcontrib). +#zstyle ':prezto:load' zfunction 'zargs' 'zmv' # # Git # # Ignore submodules when they are 'dirty', 'untracked', 'all', or 'none'. -# zstyle ':prezto:module:git:status:ignore' submodules 'all' +#zstyle ':prezto:module:git:status:ignore' submodules 'all' # # GNU Utility # # Set the command prefix on non-GNU systems. -# zstyle ':prezto:module:gnu-utility' prefix 'g' +#zstyle ':prezto:module:gnu-utility' prefix 'g' # # History Substring Search # # Set the query found color. -# zstyle ':prezto:module:history-substring-search:color' found '' +#zstyle ':prezto:module:history-substring-search:color' found '' # Set the query not found color. -# zstyle ':prezto:module:history-substring-search:color' not-found '' +#zstyle ':prezto:module:history-substring-search:color' not-found '' # Set the search globbing flags. -# zstyle ':prezto:module:history-substring-search' globbing-flags '' - -# -# Pacman -# - -# Set the Pacman frontend. -# zstyle ':prezto:module:pacman' frontend 'yaourt' - -# -# Prompt -# - -# Set the prompt theme to load. -# Setting it to 'random' loads a random theme. -# Auto set to 'off' on dumb terminals. -zstyle ':prezto:module:prompt' theme 'sorin' +#zstyle ':prezto:module:history-substring-search' globbing-flags '' # # Ruby # # Auto switch the Ruby version on directory change. -# zstyle ':prezto:module:ruby:chruby' auto-switch 'yes' - -# -# Screen -# - -# Auto start a session when Zsh is launched in a local terminal. -# zstyle ':prezto:module:screen:auto-start' local 'yes' - -# Auto start a session when Zsh is launched in a SSH connection. -# zstyle ':prezto:module:screen:auto-start' remote 'yes' - -# -# SSH -# - -# Set the SSH identities to load into the agent. -# zstyle ':prezto:module:ssh:load' identities 'id_rsa' 'id_rsa2' 'id_github' - -# -# Syntax Highlighting -# - -# Set syntax highlighters. -# By default, only the main highlighter is enabled. -# zstyle ':prezto:module:syntax-highlighting' highlighters \ -# 'main' \ -# 'brackets' \ -# 'pattern' \ -# 'cursor' \ -# 'root' -# -# Set syntax highlighting styles. -# zstyle ':prezto:module:syntax-highlighting' styles \ -# 'builtin' 'bg=blue' \ -# 'command' 'bg=blue' \ -# 'function' 'bg=blue' - -# -# Terminal -# - -# Auto set the tab and window titles. -# zstyle ':prezto:module:terminal' auto-title 'yes' - -# Set the window title format. -# zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s' - -# Set the tab title format. -# zstyle ':prezto:module:terminal:tab-title' format '%m: %s' - -# -# Tmux -# - -# Auto start a session when Zsh is launched in a local terminal. -# zstyle ':prezto:module:tmux:auto-start' local 'yes' - -# Auto start a session when Zsh is launched in a SSH connection. -# zstyle ':prezto:module:tmux:auto-start' remote 'yes' - -# Integrate with iTerm2. -# zstyle ':prezto:module:tmux:iterm' integrate 'yes' +#zstyle ':prezto:module:ruby:chruby' auto-switch 'yes' diff --git a/runcoms/zprofile b/runcoms/zprofile index d87cb3b..06b453c 100644 --- a/runcoms/zprofile +++ b/runcoms/zprofile @@ -17,8 +17,8 @@ fi # Editors # -export EDITOR='nano' -export VISUAL='nano' +export EDITOR='emacsclient -t' +export VISUAL='emacsclient' export PAGER='less' # @@ -44,6 +44,7 @@ typeset -gU cdpath fpath mailpath path # Set the list of directories that Zsh searches for programs. path=( /usr/local/{bin,sbin} + $HOME/.bin $path ) @@ -72,3 +73,6 @@ if [[ ! -d "$TMPDIR" ]]; then fi TMPPREFIX="${TMPDIR%/}/zsh" +if [[ ! -d "$TMPPREFIX" ]]; then + mkdir -p "$TMPPREFIX" +fi \ No newline at end of file diff --git a/runcoms/zshrc b/runcoms/zshrc index 039b882..2d3d6f6 100644 --- a/runcoms/zshrc +++ b/runcoms/zshrc @@ -1,13 +1,42 @@ -# +#-*- mode: sh; -*- # Executes commands at the start of an interactive session. -# # Authors: # Sorin Ionescu -# + +source "$HOME/.zprofile" # Source Prezto. if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" fi -# Customize to your needs... +# Package Management Aliases +if [ -f $HOME/.aliases.pkgman ] +then + source $HOME/.aliases.pkgman +fi + +# Aliases +if [ -f $HOME/.aliases ] +then + source $HOME/.aliases +fi + +# Various Options +unsetopt share_history +zstyle ':complpetion:*:functions' ignored-patterns '_*' + +# Keybindings +bindkey ';5D' backward-word +bindkey ';5C' forward-word + +#load fasd if it exists +hash fasd 2>/dev/null && eval "$(fasd --init auto)" + +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/Google Drive/Dublin2014-2015/" +export QT_STYLE_OVERRIDE=gtk +export ALTERNATE_EDITOR="" +TERMINAL=mate-terminal