diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-02-27 20:12:38 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-02-27 20:12:38 -0500 |
commit | 4e802e740bb2f7c6891271d3eaab39768360e261 (patch) | |
tree | 52cd247d9ffabab2f5cfb9f7821fbafbb27678f7 /.config/login.d | |
parent | bd42aa1b31e2e41cac7ac2ffa6edc05e04354815 (diff) | |
parent | d09fa8687ee01dcb4ef540deb106b8531f56b403 (diff) |
Merge branch 'master' into build64-par/master
Diffstat (limited to '.config/login.d')
-rw-r--r-- | .config/login.d/00_path.sh | 6 | ||||
-rw-r--r-- | .config/login.d/02_xdg_runtime_dir.sh | 28 | ||||
-rw-r--r-- | .config/login.d/10_gpg.sh | 2 | ||||
-rw-r--r-- | .config/login.d/10_libreoffice.sh | 4 | ||||
-rw-r--r-- | .config/login.d/90_dot-runtime.sh | 7 |
5 files changed, 13 insertions, 34 deletions
diff --git a/.config/login.d/00_path.sh b/.config/login.d/00_path.sh index 2d5f4a5..ae2e8db 100644 --- a/.config/login.d/00_path.sh +++ b/.config/login.d/00_path.sh @@ -1,8 +1,12 @@ #!/hint/sh +eval "$( if type config-path &>/dev/null; then config_path=config-path else # Bootstrap finding config-path config_path="$HOME/.local/bin/config-path" fi -eval "$(IFS=$'\n'; lines=($("$config_path")); printf -- 'export %s\n' "${lines[@]}")" +IFS=$'\n' +lines=($("$config_path")) +printf -- 'export %s\n' "${lines[@]}" +)" diff --git a/.config/login.d/02_xdg_runtime_dir.sh b/.config/login.d/02_xdg_runtime_dir.sh deleted file mode 100644 index 6e3e4ad..0000000 --- a/.config/login.d/02_xdg_runtime_dir.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/hint/sh - -# Set XDG_RUNTIME_DIR if we can -if [ -z "$XDG_RUNTIME_DIR" ] && type flock &>/dev/null; then - _diy_xdg_runtime_login() { - export XDG_RUNTIME_DIR="$XDG_CACHE_HOME/xdg-runtime-dir/$HOSTNAME" - if ! [ /dev/fd/7 -ef "$XDG_CACHE_HOME/xdg-runtime-dir/.lock" ]; then - mkdir -p -- "$XDG_CACHE_HOME/xdg-runtime-dir" - exec 7>"$XDG_CACHE_HOME/xdg-runtime-dir/.lock" - if flock -xn 7; then - if [ ! -d "$XDG_RUNTIME_DIR" ]; then - local tmp="$(mktemp -d --tmpdir -- "${USER}@${HOSTNAME}-runtime.XXXXXXXXXX")" - ln -sfT -- "$tmp" "$XDG_RUNTIME_DIR" - fi - # Unfortunately this doesn't survive across exec(1). - trap _diy_xdg_runtime_logout EXIT - flock -sn 7 - fi - fi - } - _diy_xdg_runtime_logout() { - exec 7>"$XDG_CACHE_HOME/xdg-runtime-dir/.lock" - if flock -xn 7; then - rm -rf -- "$(readlink "$XDG_RUNTIME_DIR")" - fi - } - _diy_xdg_runtime_login -fi diff --git a/.config/login.d/10_gpg.sh b/.config/login.d/10_gpg.sh index c1c5f82..83e4203 100644 --- a/.config/login.d/10_gpg.sh +++ b/.config/login.d/10_gpg.sh @@ -1,4 +1,4 @@ #!/hint/sh -if [[ -z $GPGKEY ]] && [[ -f "${HOME}/.gnupg/gpg.conf" ]]; then +if [ -z "$GPGKEY" -a -f "${HOME}/.gnupg/gpg.conf" ]; then export GPGKEY=`sed -nr 's/^\s*default-key\s+//p' "${GNUPG_HOME:-${HOME}/.gnupg}/gpg.conf"` fi diff --git a/.config/login.d/10_libreoffice.sh b/.config/login.d/10_libreoffice.sh new file mode 100644 index 0000000..1831f5a --- /dev/null +++ b/.config/login.d/10_libreoffice.sh @@ -0,0 +1,4 @@ +#!/hint/sh +# Force LibreOffice to use GTK2. +# (gtk = GTK2, gtk3 = GTK3, kde4 = Qt, gen = ?) +export SAL_USE_VCLPLUGIN=gtk diff --git a/.config/login.d/90_dot-runtime.sh b/.config/login.d/90_dot-runtime.sh index cb0b7f2..bf0ddcc 100644 --- a/.config/login.d/90_dot-runtime.sh +++ b/.config/login.d/90_dot-runtime.sh @@ -1,8 +1,7 @@ +#!/hint/sh # This is really only needed for ssh ControlPath; as I don't have a # way to communicate XDG_RUNTIME_DIR to it otherwise. -mkdir -p -- ~/.runtime +mkdir -p -- ~/.r if [ -n "$XDG_RUNTIME_DIR" ]; then - ln -sfT -- "$XDG_RUNTIME_DIR" ~/.runtime/"$HOSTNAME" -else - ln -sfT -- /tmp ~/.runtime/"$HOSTNAME" + ln -sfT -- "$XDG_RUNTIME_DIR" ~/.r/"$HOSTNAME" fi |