X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=blobdiff_plain;f=.profile;h=d4b94b089914a4392efded865f80d71a3d1609bc;hp=8f33817c9990c218f41f0ceab9535fd775f5ba98;hb=d7faba863d07e11ff41a4bb7076ffe2b24f8b42e;hpb=3539dbbc023396df1461333ebaff048131ded820 diff --git a/.profile b/.profile index 8f33817..d4b94b0 100644 --- a/.profile +++ b/.profile @@ -17,7 +17,7 @@ fi ### umask sets a mask for the default file permissions, ### umask 022 is less restrictive, 077 more paranoid -umask 027 +umask 077 PATH="$HOME"/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin MANPATH="$HOME"/man:/usr/local/man:/usr/share/man:/usr/man @@ -65,16 +65,22 @@ if [ -t 0 ] ; then # mutt, python and vim BACKGROUND=DARK export BACKGROUND + . "$HOME"/lib/config/less/dark_bg ;; *rxvt*|screen*|*term*|vt100) BACKGROUND=LIGHT export BACKGROUND + . "$HOME"/lib/config/less/light_bg ;; esac + if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + fi + PAGER=less - LESS="-gimq" + LESS="FRXgimq" case "$LC_CTYPE" in *UTF-8) LESSCHARSET=utf-8 ;; @@ -83,7 +89,7 @@ if [ -t 0 ] ; then ;; esac #LESSCHARDEF=32c. - LESSEDIT='vim ?lm+%lm -- %f' + LESSEDIT='vim ?lt+%lt. -- %f' export PAGER LESS LESSCHARSET LESSEDIT # LESSCHARDEF EDITOR="$HOME"/.vim/vim.sh @@ -133,7 +139,24 @@ if [ -t 0 ] ; then case "$SHELL" in */bash) shopt -s checkwinsize - OPS1='\u@\h ' + # display the user, host and current working directory + # in the terminal title + case "$TERM" in + *rxvt*|screen*|*term*|vt100) + OPS1="\[\033]0;\u@\h:\w\007\]" + case "$TERM" in + screen*) + OPS1=${OPS1}"\[\033k\u@\h:\w\033\\\]" # Set screen/tmux caption + ;; + esac + ;; + + *) + OPS1="" + ;; + esac + + OPS1=${OPS1}"\u@\h \W " . "$ENV" ;; *) @@ -141,16 +164,8 @@ if [ -t 0 ] ; then ;; esac - export OPS1 - - case "$TERM" in - *rxvt*|screen*|*term*|vt100) - if [ -x "`which xtitle 2>/dev/null`" ]; then - PROMPT_COMMAND=xtitle - export PROMPT_COMMAND - fi - ;; - esac + #PROMPT_DIRTRIM=2 + export OPS1 # PROMPT_DIRTRIM ### biff controls new mail notification #biff n @@ -175,6 +190,10 @@ if [ -t 0 ] ; then export HGUSER unset name email + + if test -f .hushlogin && ! cmp -s .motd /etc/motd; then + tee $HOME/.motd < /etc/motd + fi fi # No need to set DISPLAY - ssh sets DISPLAY and calls xauth @@ -185,6 +204,7 @@ if [ -n "$DISPLAY" ]; then # mutt, python and vim BACKGROUND=LIGHT export BACKGROUND + . "$HOME"/lib/config/less/light_bg # BROWSERs BROWSER="firefox:seamonkey:chromium:google-chrome:opera:xlinks2:$BROWSER"