80 lines
1.9 KiB
Bash
80 lines
1.9 KiB
Bash
## -*- mode:sh -*- #
|
|
################################################################################
|
|
## Shell Config -- Main
|
|
## Date 2012-07-27
|
|
################################################################################
|
|
|
|
## Mask
|
|
## Result for 027 is: rwxr-x---
|
|
umask 027
|
|
|
|
## Path
|
|
export PATH=.:$PATH
|
|
|
|
## TeXlive
|
|
TEXDIR="${TEXDIR:-/usr/local/texlive}"
|
|
if [ -d "${TEXDIR}" ]; then
|
|
TEXYEAR=$(/bin/ls -1r "${TEXDIR}" | grep -m1 "[0-9]\{4\}")
|
|
TEXDISTRO=$(uname -m)-$(uname | tr "[[:upper:]]" "[[:lower:]]")
|
|
TEXFOLDER="${TEXDIR}/${TEXYEAR}/bin/${TEXDISTRO}/"
|
|
if [ -d "${TEXFOLDER}" ]; then
|
|
export PATH=${TEXFOLDER}:$PATH
|
|
export MANPATH=${TEXDIR}/${TEXYEAR}/texmf/doc/man:$MANPATH
|
|
export INFOPATH=${TEXDIR}/${TEXYEAR}/texmf/doc/info:$INFOPATH
|
|
fi
|
|
unset TEXYEAR
|
|
unset TEXDISTRO
|
|
unset TEXFOLDER
|
|
fi
|
|
unset TEXDIR
|
|
|
|
## Enable color support of ls.
|
|
if [ "$TERM" != "dumb" ]; then
|
|
eval "`dircolors -b`"
|
|
fi
|
|
|
|
## Terminal
|
|
## WARNING: this is always a bad idea!
|
|
# if [[ "$TERM" = "*rxvt*" ]]; then
|
|
# export TERM="rxvt-unicode"
|
|
# fi
|
|
|
|
## Make 'less' more friendly for non-text input files, see lesspipe(1).
|
|
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
|
|
|
|
## Manpage.
|
|
export MANPAGER="less -s"
|
|
export MANWIDTH=80
|
|
|
|
## Less config. -R is needed for lesspipe.
|
|
export LESS=' -R '
|
|
|
|
## Time display (with ls command for example)
|
|
export TIME_STYLE=+"|%Y-%m-%d %H:%M:%S|"
|
|
|
|
## System locale
|
|
# export LC_MESSAGES=fr_FR.utf8
|
|
|
|
## Default text editor
|
|
EDITOR=nano
|
|
if [ -n "$(command -v vim)" ]; then
|
|
EDITOR=vim
|
|
fi
|
|
if [ -n "$(command -v emacs)" ]; then
|
|
EDITOR='emacsclient -a "" -t'
|
|
fi
|
|
export EDITOR
|
|
|
|
## Internet Browser
|
|
[ -e "/usr/bin/luakit" ] && export BROWSER="luakit"
|
|
|
|
## Title
|
|
## If this is an xterm set the title to user@host:dir
|
|
#case "$TERM" in
|
|
#xterm*|rxvt*)
|
|
# PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
|
|
# ;;
|
|
#*)
|
|
# ;;
|
|
#esac
|