This commit is contained in:
David Tomaschik
2018-04-15 09:10:27 -07:00
8 changed files with 3084 additions and 6 deletions

View File

@@ -21,8 +21,28 @@ fi
# For virtualenvwrapper # For virtualenvwrapper
export WORKON_HOME=$HOME/.virtualenvs export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
# GPG full key id # GPG full key id
export GPG_ID=7FD58D9A196DCEEEAD671F94F4D7A7915DEA789B export GPG_ID=7FD58D9A196DCEEEAD671F94F4D7A7915DEA789B
# Setup locale
for l in en_US.UTF-8 C ; do
if grep -q "${l}" /usr/share/i18n/SUPPORTED ; then
export LC_CTYPE=${l}
export LC_NUMERIC=${l}
export LC_TIME=${l}
export LC_MONETARY=${l}
export LC_MESSAGES=${l}
export LC_PAPER=${l}
export LC_NAME=${l}
export LC_ADDRESS=${l}
export LC_TELEPHONE=${l}
export LC_MEASUREMENT=${l}
export LC_IDENTIFICATION=${l}
break
fi
done
export LC_COLLATE=C
if [[ -e $HOME/.localenv ]] ; then source $HOME/.localenv ; fi if [[ -e $HOME/.localenv ]] ; then source $HOME/.localenv ; fi

8
dotfiles/zlogin Normal file
View File

@@ -0,0 +1,8 @@
# Execute code that does not affect the current session in the background.
{
# Compile the completion dump to increase startup speed.
zcompdump="${ZDOTDIR:-$HOME}/.zcompdump"
if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then
zcompile "$zcompdump"
fi
} &!

View File

@@ -60,6 +60,7 @@ function jekyll {
local DATE local DATE
local NEWNAME local NEWNAME
local JEKYLL_DIR local JEKYLL_DIR
local EDITOR=${EDITOR:-vim}
JEKYLL_DIR=`_jekyll_locate_dir` JEKYLL_DIR=`_jekyll_locate_dir`
@@ -73,7 +74,12 @@ function jekyll {
JTEMPLATE+="category: Blog\n" JTEMPLATE+="category: Blog\n"
JTEMPLATE+="---\n\n" JTEMPLATE+="---\n\n"
TITLE=${@[2,-1]} TITLE=${@[2,-1]}
SLUG=$(echo -n ${TITLE}|tr A-Z a-z|tr -c -s -- a-z0-9 -) SLUG=$(echo -n ${TITLE} |
tr A-Z a-z | # Everything in lower case
tr -d "'" | # Remove single quotes entirely
tr -c -s -- a-z0-9 - | # Replace non-alphanums with dashes
sed 's/^-*\([^-].*[^-]\)-*$/\1/' # Remove leading and trailing slashes
)
DATE=`date +%Y-%m-%d` DATE=`date +%Y-%m-%d`
case "${1:-help}" in case "${1:-help}" in
@@ -93,7 +99,7 @@ function jekyll {
mkdir -p "${JEKYLL_DIR}/_drafts" mkdir -p "${JEKYLL_DIR}/_drafts"
FILENAME="${JEKYLL_DIR}/_drafts/${SLUG}.md" FILENAME="${JEKYLL_DIR}/_drafts/${SLUG}.md"
printf -- "${JTEMPLATE}" "${TITLE}" > "${FILENAME}" printf -- "${JTEMPLATE}" "${TITLE}" > "${FILENAME}"
vim "${FILENAME}" '+$' '+startinsert' ${EDITOR} "${FILENAME}" '+$' '+startinsert'
;; ;;
post) post)
if [ -z "${SLUG}" ] ; then if [ -z "${SLUG}" ] ; then
@@ -103,7 +109,7 @@ function jekyll {
FILENAME="${JEKYLL_DIR}/_posts/${DATE}-${SLUG}.md" FILENAME="${JEKYLL_DIR}/_posts/${DATE}-${SLUG}.md"
printf -- "${JTEMPLATE}" "${TITLE}" > "${FILENAME}" printf -- "${JTEMPLATE}" "${TITLE}" > "${FILENAME}"
_jekyll_set_date "${FILENAME}" "${DATE}" _jekyll_set_date "${FILENAME}" "${DATE}"
vim "${FILENAME}" '+$' '+startinsert' ${EDITOR} "${FILENAME}" '+$' '+startinsert'
;; ;;
publish) publish)
if [ -z "${SLUG}" ] ; then if [ -z "${SLUG}" ] ; then
@@ -131,7 +137,7 @@ function jekyll {
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
return return
fi fi
vim "${FILENAME}" ${EDITOR} "${FILENAME}"
;; ;;
*) *)
command jekyll "$@" command jekyll "$@"

View File

@@ -17,12 +17,16 @@ function prompt_matir_setup {
zstyle ':vcs_info:*' formats ' (%b%u%c)' zstyle ':vcs_info:*' formats ' (%b%u%c)'
zstyle ':vcs_info:*' stagedstr '*' zstyle ':vcs_info:*' stagedstr '*'
zstyle ':vcs_info:*' unstagedstr '*' zstyle ':vcs_info:*' unstagedstr '*'
zstyle ':vcs_info:git*+set-message:*' hooks git-untracked
# Virtualenv formatting
zstyle ':prezto:module:python:info:virtualenv' format ' (py:%v)'
# TODO: add virtualenv/rvm info
PROMPT='%{$fg[black]%}[%{$fg[yellow]%}%h%{$fg[black]%}] ' # History # PROMPT='%{$fg[black]%}[%{$fg[yellow]%}%h%{$fg[black]%}] ' # History #
PROMPT+='%{%(!.$fg[red].$fg[green])%}%8>..>%n%>>%{$fg[white]%}@' # username@ PROMPT+='%{%(!.$fg[red].$fg[green])%}%8>..>%n%>>%{$fg[white]%}@' # username@
PROMPT+='%{$fg[blue]%}%12>..>%m%>>%{$fg[white]%}:' # hostname PROMPT+='%{$fg[blue]%}%12>..>%m%>>%{$fg[white]%}:' # hostname
PROMPT+='%{$fg[green]%}%32<...<%~%<<' # path PROMPT+='%{$fg[green]%}%32<...<%~%<<' # path
PROMPT+='%{$fg[magenta]%}${python_info[virtualenv]}' # virtualenv
PROMPT+='%{$fg[blue]%}${vcs_info_msg_0_}' # VCS info PROMPT+='%{$fg[blue]%}${vcs_info_msg_0_}' # VCS info
PROMPT+='%{$fg[white]%}%#%{$reset_color%} ' # prompt symbol PROMPT+='%{$fg[white]%}%#%{$reset_color%} ' # prompt symbol
@@ -47,6 +51,17 @@ function prompt_matir_setup {
function prompt_matir_precmd { function prompt_matir_precmd {
vcs_info vcs_info
python-info
}
### git: Show marker (*) if there are untracked files in repository
# Make sure you have added staged to your 'formats': %c
+vi-git-untracked(){
if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == 'true' ]] && \
git status --porcelain | grep '??' &> /dev/null ; then
hook_com[staged]+='*'
fi
} }
prompt_matir_setup "$@" prompt_matir_setup "$@"

File diff suppressed because it is too large Load Diff

View File

@@ -147,7 +147,7 @@ zstyle ':prezto:module:prompt' theme 'matir'
# zstyle ':prezto:module:python:virtualenv' auto-switch 'yes' # zstyle ':prezto:module:python:virtualenv' auto-switch 'yes'
# Automatically initialize virtualenvwrapper if pre-requisites are met. # Automatically initialize virtualenvwrapper if pre-requisites are met.
# zstyle ':prezto:module:python:virtualenv' initialize 'yes' zstyle ':prezto:module:python:virtualenv' initialize 'yes'
# #
# Screen # Screen

View File

@@ -7,3 +7,4 @@ network-manager-openvpn-gnome
vim-gtk vim-gtk
wireshark wireshark
wkhtmltopdf wkhtmltopdf
zeal

View File

@@ -12,6 +12,7 @@ kpartx
ldap-utils ldap-utils
lvm2 lvm2
most most
nasm
opensc opensc
openvpn openvpn
p7zip-full p7zip-full