]> git.phdru.name Git - dotfiles.git/blobdiff - .profile
.profile, .shellrc: use dircolors
[dotfiles.git] / .profile
index a7d8c018b4ce08df328e1213a80e9ecedcdf89df..564c40fb73eb26157692264ac75ce4d5c4602cdf 100644 (file)
--- 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
@@ -62,19 +62,25 @@ if [ -t 0 ] ; then
 
    case "$TERM" in
       linux)
-         # mutt, vim and python
+         # 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="gimq"
    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
@@ -175,6 +181,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
@@ -182,9 +192,10 @@ fi
 #export DISPLAY
 
 if [ -n "$DISPLAY" ]; then
-   # mutt, vim and python
+   # mutt, python and vim
    BACKGROUND=LIGHT
    export BACKGROUND
+   . "$HOME"/lib/config/less/light_bg
 
    # BROWSERs
    BROWSER="firefox:seamonkey:chromium:google-chrome:opera:xlinks2:$BROWSER"