mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Merge branch 'master' of https://github.com./Matir/skel
This commit is contained in:
20
dotfiles/env
20
dotfiles/env
@@ -21,8 +21,28 @@ fi
|
||||
|
||||
# For virtualenvwrapper
|
||||
export WORKON_HOME=$HOME/.virtualenvs
|
||||
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
|
||||
|
||||
# GPG full key id
|
||||
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
|
||||
|
||||
8
dotfiles/zlogin
Normal file
8
dotfiles/zlogin
Normal 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
|
||||
} &!
|
||||
@@ -60,6 +60,7 @@ function jekyll {
|
||||
local DATE
|
||||
local NEWNAME
|
||||
local JEKYLL_DIR
|
||||
local EDITOR=${EDITOR:-vim}
|
||||
|
||||
JEKYLL_DIR=`_jekyll_locate_dir`
|
||||
|
||||
@@ -73,7 +74,12 @@ function jekyll {
|
||||
JTEMPLATE+="category: Blog\n"
|
||||
JTEMPLATE+="---\n\n"
|
||||
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`
|
||||
|
||||
case "${1:-help}" in
|
||||
@@ -93,7 +99,7 @@ function jekyll {
|
||||
mkdir -p "${JEKYLL_DIR}/_drafts"
|
||||
FILENAME="${JEKYLL_DIR}/_drafts/${SLUG}.md"
|
||||
printf -- "${JTEMPLATE}" "${TITLE}" > "${FILENAME}"
|
||||
vim "${FILENAME}" '+$' '+startinsert'
|
||||
${EDITOR} "${FILENAME}" '+$' '+startinsert'
|
||||
;;
|
||||
post)
|
||||
if [ -z "${SLUG}" ] ; then
|
||||
@@ -103,7 +109,7 @@ function jekyll {
|
||||
FILENAME="${JEKYLL_DIR}/_posts/${DATE}-${SLUG}.md"
|
||||
printf -- "${JTEMPLATE}" "${TITLE}" > "${FILENAME}"
|
||||
_jekyll_set_date "${FILENAME}" "${DATE}"
|
||||
vim "${FILENAME}" '+$' '+startinsert'
|
||||
${EDITOR} "${FILENAME}" '+$' '+startinsert'
|
||||
;;
|
||||
publish)
|
||||
if [ -z "${SLUG}" ] ; then
|
||||
@@ -131,7 +137,7 @@ function jekyll {
|
||||
if [ $? -ne 0 ] ; then
|
||||
return
|
||||
fi
|
||||
vim "${FILENAME}"
|
||||
${EDITOR} "${FILENAME}"
|
||||
;;
|
||||
*)
|
||||
command jekyll "$@"
|
||||
|
||||
@@ -17,12 +17,16 @@ function prompt_matir_setup {
|
||||
zstyle ':vcs_info:*' formats ' (%b%u%c)'
|
||||
zstyle ':vcs_info:*' stagedstr '*'
|
||||
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[red].$fg[green])%}%8>..>%n%>>%{$fg[white]%}@' # username@
|
||||
PROMPT+='%{$fg[blue]%}%12>..>%m%>>%{$fg[white]%}:' # hostname
|
||||
PROMPT+='%{$fg[green]%}%32<...<%~%<<' # path
|
||||
PROMPT+='%{$fg[magenta]%}${python_info[virtualenv]}' # virtualenv
|
||||
PROMPT+='%{$fg[blue]%}${vcs_info_msg_0_}' # VCS info
|
||||
PROMPT+='%{$fg[white]%}%#%{$reset_color%} ' # prompt symbol
|
||||
|
||||
@@ -47,6 +51,17 @@ function prompt_matir_setup {
|
||||
|
||||
function prompt_matir_precmd {
|
||||
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 "$@"
|
||||
|
||||
3027
dotfiles/zprezto_custom/xtra_completions/functions/_docker
Normal file
3027
dotfiles/zprezto_custom/xtra_completions/functions/_docker
Normal file
File diff suppressed because it is too large
Load Diff
@@ -147,7 +147,7 @@ zstyle ':prezto:module:prompt' theme 'matir'
|
||||
# zstyle ':prezto:module:python:virtualenv' auto-switch 'yes'
|
||||
|
||||
# Automatically initialize virtualenvwrapper if pre-requisites are met.
|
||||
# zstyle ':prezto:module:python:virtualenv' initialize 'yes'
|
||||
zstyle ':prezto:module:python:virtualenv' initialize 'yes'
|
||||
|
||||
#
|
||||
# Screen
|
||||
|
||||
@@ -7,3 +7,4 @@ network-manager-openvpn-gnome
|
||||
vim-gtk
|
||||
wireshark
|
||||
wkhtmltopdf
|
||||
zeal
|
||||
|
||||
@@ -12,6 +12,7 @@ kpartx
|
||||
ldap-utils
|
||||
lvm2
|
||||
most
|
||||
nasm
|
||||
opensc
|
||||
openvpn
|
||||
p7zip-full
|
||||
|
||||
Reference in New Issue
Block a user