···11#!/usr/bin/env bash
22+# shellcheck disable=SC2034
33+# SPDX-License-Identifier: MPL-2.0
2435# Workaround in cases where XDG_RUNTIME_DIR is undefined on login
44-if [[ ! -n "${XDG_RUNTIME_DIR}" ]]; then
66+if [[ -z "${XDG_RUNTIME_DIR}" ]]; then
57 echo "warning: XDG_RUNTIME_DIR is possibly undefined, see https://github.com/swaywm/sway/issues/7202"
68 echo "warning: for context and https://wiki.archlinux.org/title/XDG_Base_Directory for docs"
79 echo "warning: setting it up for you using the default '/run/user/$(id -u)' value in 3s..."
810 sleep 3
99- export XDG_RUNTIME_DIR="/run/user/$(id -u)"
1111+ XDG_RUNTIME_DIR="/run/user/$(id -u)"
1212+ export XDG_RUNTIME_DIR
1013fi
11141215# do feature detection if keychain is installed
···1720fi
18211922try_keychain_ssh_agent() {
2020- if [[ FF_KEYCHAIN == "1" ]]; then
2323+ if [[ $FF_KEYCHAIN == "1" ]]; then
2124 echo "[ssh-agent-loader::keychain] attempting to use keychain for SSH agents"
2225 eval "$(keychain --eval --agents ssh,gpg)"
2326 else