From 3d085aa870a164b69ba7ee1e897d47810972539d Mon Sep 17 00:00:00 2001 From: Matt Singleton Date: Fri, 16 Feb 2024 10:01:41 -0600 Subject: new zsh config file for graphical session stuff --- config/all/zsh/.zprofile | 3 --- config/all/zsh/60-graphical-session.zsh | 8 ++++++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 config/all/zsh/60-graphical-session.zsh (limited to 'config') diff --git a/config/all/zsh/.zprofile b/config/all/zsh/.zprofile index a9a13c9..68b0ec4 100644 --- a/config/all/zsh/.zprofile +++ b/config/all/zsh/.zprofile @@ -2,6 +2,3 @@ if [ "$(uname)" = "Darwin" ]; then # disable Apple Terminal's annoying session restore feature SHELL_SESSIONS_DISABLE=1 fi -if [ "$DESKTOP_SESSION" = "sway-session" ]; then - export $(gnome-keyring-daemon --start) -fi diff --git a/config/all/zsh/60-graphical-session.zsh b/config/all/zsh/60-graphical-session.zsh new file mode 100644 index 0000000..3d4b53a --- /dev/null +++ b/config/all/zsh/60-graphical-session.zsh @@ -0,0 +1,8 @@ +if [ -n "$XDG_SESSION_DESKTOP" ] && command -v gnome-keyring-daemon > /dev/null; then + # load the keyring daemon into the environment if: + # - we're in a graphical session + # - the daemon is installed + # starts the daemon if it hasn't been started already, + # otherwise just exports the auth socket of the existing daemon + export $(gnome-keyring-daemon --start 2> /dev/null) +fi -- cgit v1.2.3