Skip to content

Commit

Permalink
add shell-agnostic profile
Browse files Browse the repository at this point in the history
for sourcing from bash, etc
  • Loading branch information
pigmonkey committed Dec 31, 2016
1 parent 23a3f7c commit 82ef12b
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 97 deletions.
96 changes: 96 additions & 0 deletions profile
@@ -0,0 +1,96 @@
#
# Terminal
#

export TERMINAL='termite'

#
# Editors
#

export EDITOR='vim'
export VISUAL='vim'
export PAGER='less'

#
# Language
#

export LANG='en_US.UTF-8'

#
# Path
#

export PATH=~/bin:$PATH

#
# Less
#

# Set the default Less options.
# Mouse-wheel scrolling has been disabled by -X (disable screen clearing).
# Remove -X and -F (exit if the content fits on one screen) to enable it.
export LESS='-F -g -i -M -R -S -w -X -z-4'

# Find lesspipe
if command -v lesspipe.sh >/dev/null 2>&1; then
lesspipe="lesspipe.sh"
elif command -v lesspipe >/dev/null 2>&1; then
lesspipe="lesspipe"
fi

# Set the less input preprocessor.
if [[ -z "$lesspipe" ]]; then
export LESSOPEN="| $lesspipe %s 2>&-"
fi

#
# Temporary Files
#

if [[ ! -d "$TMPDIR" ]]; then
export TMPDIR="/tmp/$LOGNAME"
mkdir -p -m 700 "$TMPDIR"
fi

TMPPREFIX="${TMPDIR%/}/zsh"

#
# Python
#

# Set the default project directory for virtualenvwrapper.
export PROJECT_HOME="$HOME/projects"

# Set the default virtualenvwrapper options.
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'

#
# Notes
#

# Set the default note directory.
export NOTEDIR=~/documents/notes

#
# Passwords
#

# Set the alternative pass directory.
export ALTPASSDIR=~/projects/tad/pass

#
# Misc
#

# Set the dmenu font.
export DMENU_OPTIONS="-fn -xos4-terminus-medium-r-*-*-14-*"

# Source credentials.
if [ -f ~/.keys/creds.sh ]; then
source ~/.keys/creds.sh
fi

# Disable QT5 DPI scaling
export QT_AUTO_SCREEN_SCALE_FACTOR=0
98 changes: 1 addition & 97 deletions zprofile
@@ -1,100 +1,4 @@
#
# Terminal
#

export TERMINAL='termite'

#
# Editors
#

export EDITOR='vim'
export VISUAL='vim'
export PAGER='less'

#
# Language
#

if [[ -z "$LANG" ]]; then
export LANG='en_US.UTF-8'
fi

#
# Paths
#
source ~/.profile

# Ensure path arrays do not contain duplicates.
typeset -gU cdpath fpath mailpath path

# Set the list of directories that Zsh searches for programs.
path=(
$HOME/bin
/usr/local/{bin,sbin}
$path
)

#
# Less
#

# Set the default Less options.
# Mouse-wheel scrolling has been disabled by -X (disable screen clearing).
# Remove -X and -F (exit if the content fits on one screen) to enable it.
export LESS='-F -g -i -M -R -S -w -X -z-4'

# Set the Less input preprocessor.
# Try both `lesspipe` and `lesspipe.sh` as either might exist on a system.
if (( $#commands[(i)lesspipe(|.sh)] )); then
export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-"
fi

#
# Temporary Files
#

if [[ ! -d "$TMPDIR" ]]; then
export TMPDIR="/tmp/$LOGNAME"
mkdir -p -m 700 "$TMPDIR"
fi

TMPPREFIX="${TMPDIR%/}/zsh"

#
# Python
#

# Set the default project directory for virtualenvwrapper.
export PROJECT_HOME="$HOME/projects"

# Set the default virtualenvwrapper options.
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'

#
# Notes
#

# Set the default note directory.
export NOTEDIR=~/documents/notes

#
# Passwords
#

# Set the alternative pass directory.
export ALTPASSDIR=~/projects/tad/pass

#
# Misc
#

# Set the dmenu font.
export DMENU_OPTIONS="-fn -xos4-terminus-medium-r-*-*-14-*"

# Source credentials.
if [ -f ~/.keys/creds.sh ]; then
source ~/.keys/creds.sh
fi

# Disable QT5 DPI scaling
export QT_AUTO_SCREEN_SCALE_FACTOR=0

0 comments on commit 82ef12b

Please sign in to comment.