From bf63e412c8e2c9733f1855f4ddffd1122cc5bd48 Mon Sep 17 00:00:00 2001 From: Isaac Shoebottom Date: Thu, 24 Apr 2025 02:28:57 -0300 Subject: [PATCH] Add login shell check --- dot_config/bash/dot_bashrc | 2 +- dot_config/zsh/dot_zshrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dot_config/bash/dot_bashrc b/dot_config/bash/dot_bashrc index 83ebc3f..4349e25 100644 --- a/dot_config/bash/dot_bashrc +++ b/dot_config/bash/dot_bashrc @@ -6,7 +6,7 @@ # Workaround for SSH/Login sessions # https://github.com/systemd/systemd/issues/7641#issuecomment-680694017 -if [[ -f /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator ]]; then +if shopt -q login_shell && [[ -f /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator ]]; then set -a eval "$(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator)" set +a diff --git a/dot_config/zsh/dot_zshrc b/dot_config/zsh/dot_zshrc index 85484ce..fc87908 100644 --- a/dot_config/zsh/dot_zshrc +++ b/dot_config/zsh/dot_zshrc @@ -6,7 +6,7 @@ # Workaround for SSH/Login sessions # https://github.com/systemd/systemd/issues/7641#issuecomment-680694017 -if [[ -f /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator ]]; then +if [[ -o login || -f /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator ]]; then set -a eval "$(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator)" set +a