From bfb6dcd4dfb755a159aa5ecf0a243f470f4a731a Mon Sep 17 00:00:00 2001 From: colem Date: Wed, 29 Jul 2026 10:45:23 -0500 Subject: [PATCH] Add: opencode PATH and WSL keyring/dbus setup --- .zshrc | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.zshrc b/.zshrc index 48e4cb2..6f07f91 100644 --- a/.zshrc +++ b/.zshrc @@ -5,7 +5,7 @@ fi # Load local environment secrets if the file exists if [ -f "$HOME/.secrets" ]; then - set -a + set -a source "$HOME/.secrets" set +a fi @@ -29,11 +29,24 @@ if [[ -d $HOME/.scripts && ":$PATH:" != *":$PATH:"* ]]; then export PATH=$PATH:$HOME/.scripts fi +# Add opencode binaries to $PATH if they exist +if [[ -d $HOME/.opencode/bin && ":$PATH:" != *":$HOME/.opencode/bin:"* ]]; then + export PATH=$PATH:$HOME/.opencode/bin +fi + # Linux specific # if [[ "$(uname -s)" == "Linux" ]]; then - + # fi +# WSL specific +if [ -n "$IS_WSL" ] || [ -n "$WSL_DISTRO_NAME" ]; then + eval $(dbus-launch --sh-syntax 2>/dev/null) 2>/dev/null || true + eval $(printf '' | gnome-keyring-daemon --unlock 2>/dev/null) 2>/dev/null || true + export SSH_AUTH_SOCK + export SECRET_SERVICE_BUS_ADDRESS="unix:path=/run/user/$(id -u)/keyring/control" +fi + # MacOS specific if [[ "$(uname -s)" == "Darwin" ]]; then # Add python3.8 $PATH if installed and not already in $PATH