summaryrefslogtreecommitdiff
path: root/.profile
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-10-16 19:09:42 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-10-16 19:09:42 -0400
commit1ff883371700757696efafefe266572776ac9558 (patch)
treed2104f7f405f4fe7a8957e86f53300ee6d4b1aeb /.profile
parent3d607ee3f5dc7fd27bbce6c447e02778310a4b9d (diff)
parent3515a46d330af1d09bf1e0b963c13a86c2dbe8a8 (diff)
Merge branch 'master' into build64-par
Conflicts: .login-daemons
Diffstat (limited to '.profile')
-rw-r--r--.profile76
1 files changed, 42 insertions, 34 deletions
diff --git a/.profile b/.profile
index f394fbd..a6c4d91 100644
--- a/.profile
+++ b/.profile
@@ -1,4 +1,8 @@
# ~/.profile: executed by the command interpreter for login shells.
+# Should be whether logging in graphically or not.
+#
+# This file should be executable by /bin/sh, but I'm going to assume bash(1)
+#
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
@@ -9,68 +13,72 @@ umask 022
## Paths #############################################################
# Unix
-bins=`echo $HOME/bin $HOME/.local/bin $HOME/.prefix/bin $HOME/.gem/ruby/*/bin`
-for dir in $bins; do
- if [ -d "$dir" ]; then
- export PATH="$dir:$PATH"
- fi
+bins=($HOME/bin $HOME/.local.`uname -m`/bin $HOME/.local/bin $HOME/.prefix.`uname -m`/bin $HOME/.prefix/bin $HOME/.gem/ruby/*/bin)
+for dir in "${bins[@]}"; do
+ if [ -d "$dir" ]; then
+ export PATH="$dir:$PATH"
+ fi
done
# Ruby
for dir in $HOME/.prefix/lib; do
- if [ -d "$dir" ]; then
- export RUBYLIB="$dir"
- fi
+ if [ -d "$dir" ]; then
+ export RUBYLIB="$dir"
+ fi
done
# Settings ###########################################################
# Text editor
if [ -f "$HOME/.selected_editor" ]; then
- . "$HOME/.selected_editor"
- export SELECTED_EDITOR
- export ALTERNATE_EDITOR
- export EDITOR="${EDITOR:-$SELECTED_EDITOR}"
- export VISUAL="${VISUAL:-$SELECTED_EDITOR}"
+ . "$HOME/.selected_editor"
+ export SELECTED_EDITOR
+ export ALTERNATE_EDITOR
+ export EDITOR="${EDITOR:-$SELECTED_EDITOR}"
+ export VISUAL="${VISUAL:-$SELECTED_EDITOR}"
fi
# GPG
-export GPGKEY=D4FFBFC9
+if [ -z "$GPGKEY" ] && [ -f "${HOME}/.gnupg/gpg.conf" ]; then
+ export GPGKEY=`sed -nr 's/^\s*default-key\s+//p' "${HOME}/.gnupg/gpg.conf"`
+fi
+if [ -z "$(pgrep -u `whoami` gpg-agent)" ]; then
+ mkdir -p ${XDG_RUNTIME_DIR}/sessions/gpg
+ gpg-agent --daemon --write-env-file "${XDG_RUNTIME_DIR}/sessions/gpg"
+fi
+if [ -f "${XDG_RUNTIME_DIR}/sessions/gpg" ]; then
+ . "${XDG_RUNTIME_DIR}/sessions/gpg"
+ export GPG_AGENT_INFO
+ #export SSH_AUTH_SOCK
+fi
# Java
_JAVA_OPTIONS=''
_JAVA_OPTIONS+=' -Dawt.useSystemAAFontSettings=on'
_JAVA_OPTIONS+=' -Dswing.aatext=true'
_JAVA_OPTIONS+=' -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
-_JAVA_OPTIONS+=" -Djava.io.tmpdir=$TMPDIR"
-export _JAVA_OPTIONS
-
-# ALSA
-if [ -x "`which alsactl 2>/dev/null`" ]; then
- alsactl restore "$HOME/.current.asound" &> /dev/null || true
+if [ -n "$TMPDIR" ]; then
+ _JAVA_OPTIONS+=" -Djava.io.tmpdir=$TMPDIR"
fi
+export _JAVA_OPTIONS
# X11
if [ -z "$XAUTHORITY" ]; then
- export XAUTHORITY=$HOME/.Xauthority
+ export XAUTHORITY=$HOME/.Xauthority
fi
# D-Bus
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
- eval `dbus-launch`
- export DBUS_SESSION_BUS_ADDRESS
- export DBUS_SESSION_BUS_PID
-fi
+ # I want a separate instance for each login
+ #dbus-launch > "${HOME}/.cache/sessions/dbus"
+ #. "${HOME}/.cache/sessions/dbus"
+ eval `dbus-launch`
-# Start background programs ##########################################
-if [ -f "$HOME/.login-daemons" ]; then
- . "$HOME/.login-daemons"
+ export DBUS_SESSION_BUS_ADDRESS
+ export DBUS_SESSION_BUS_PID
fi
-# BASH ###############################################################
-if [ -n "$BASH_VERSION" ]; then
- # include .bashrc if it exists
- if [ -f "$HOME/.bashrc" ]; then
- . "$HOME/.bashrc"
- fi
+# Load any box-specific stuff
+if [ -f "$HOME/.profile.local" ]; then
+ . "$HOME/.profile.local"
fi