diff options
Diffstat (limited to '.config/login.sh')
-rw-r--r-- | .config/login.sh | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/.config/login.sh b/.config/login.sh index 3dad752..2687a8e 100644 --- a/.config/login.sh +++ b/.config/login.sh @@ -27,9 +27,15 @@ export TMPDIR="$HOME/tmp" # XDG ################################################################ . "$HOME/.local/lib/xdg.sh" +ln -sf -- "$XDG_RUNTIME_DIR/sessions" ~/.sessions # Settings ########################################################### +# Spell check +if [[ -z "$DICTIONARY" ]] && [[ -n "$LANG" ]]; then + export DICTIONARY="${LANG%%.*}" +fi + # Text editor if [[ -f "$HOME/.selected_editor" ]]; then . "$HOME/.selected_editor" @@ -41,13 +47,17 @@ fi # GPG if [[ -z $GPGKEY ]] && [[ -f "${HOME}/.gnupg/gpg.conf" ]]; then + echo 'login: Setting GPGKEY' export GPGKEY=`sed -nr 's/^\s*default-key\s+//p' "${HOME}/.gnupg/gpg.conf"` fi if [[ -z "$(pgrep -u `whoami` gpg-agent)" ]] && [[ -n $XDG_RUNTIME_DIR ]] && type gpg-agent &>/dev/null; then + echo 'login: Starting gpg-agent' mkdir -p "${XDG_RUNTIME_DIR}/sessions" - gpg-agent --daemon --write-env-file "${XDG_RUNTIME_DIR}/sessions/gpg" &>/dev/null + gpg-agent --daemon --write-env-file "${XDG_RUNTIME_DIR}/sessions/gpg" >/dev/null fi if [[ -f "${XDG_RUNTIME_DIR}/sessions/gpg" ]]; then + echo 'login: Setting gpg-agent info:' + cat "${XDG_RUNTIME_DIR}/sessions/gpg" . "${XDG_RUNTIME_DIR}/sessions/gpg" export GPG_AGENT_INFO #export SSH_AUTH_SOCK @@ -65,19 +75,21 @@ export _JAVA_OPTIONS # X11 if [[ -z $XAUTHORITY ]]; then - export XAUTHORITY="$HOME/.Xauthority" + #export XAUTHORITY="$HOME/.Xauthority" + mkdir -p "${XDG_RUNTIME_DIR}/sessions" + export XAUTHORITY="${XDG_RUNTIME_DIR}/sessions/Xauthority" fi # D-Bus -if [[ -z $DBUS_SESSION_BUS_ADDRESS ]] && type dbus-launch &>/dev/null; then - # I want a separate instance for each login - #dbus-launch > "${HOME}/.cache/sessions/dbus" - #. "${HOME}/.cache/sessions/dbus" - eval `dbus-launch` - - export DBUS_SESSION_BUS_ADDRESS - export DBUS_SESSION_BUS_PID -fi +# if [[ -z $DBUS_SESSION_BUS_ADDRESS ]] && type dbus-launch &>/dev/null; then +# # I want a separate instance for each login +# #dbus-launch > "${HOME}/.cache/sessions/dbus" +# #. "${HOME}/.cache/sessions/dbus" +# eval `dbus-launch` + +# export DBUS_SESSION_BUS_ADDRESS +# export DBUS_SESSION_BUS_PID +# fi # Load any box-specific stuff if [[ -f "$XDG_CONFIG_HOME/login.local.sh" ]]; then |