Repository navigation
Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Do not work for me (running fish shell) Does work in both bash and fish |
|
Here is a more safe version there can be run multiple times and only do needed actions #!/bin/bash
env_file=$HOME/.config/uwsm/env
packages=("bitwarden" "bitwarden-cli")
use_bitwarden_as_ssh_agent=false
echo ${packages[@]}
if omarchy-pkg-missing "${packages[@]}"; then
echo "Installing Bitwarden..."
omarchy-pkg-add "${packages[@]}"
else
echo "Bitwarden already installed"
fi
if ! grep -Fq "SSH_AUTH_SOCK" $env_file; then
# ask user if they want to use Bitwarden as their SSH agent and configure SSH_AUTH_SOCK accordingly
if gum confirm "Use Bitwarden as SSH agent?"; then
use_bitwarden_as_ssh_agent=true
echo "export SSH_AUTH_SOCK=/home/$USER/.bitwarden-ssh-agent.sock" | tee -a $env_file &>/dev/null
echo "Make sure to enable SSH agent support in Bitwarden settings."
fi
fi
setsid gtk-launch bitwarden &>/dev/null
if [[ $use_bitwarden_as_ssh_agent == "true" ]]; then
touch ~/.local/state/omarchy/reboot-required
omarchy-update-restart
fi
|
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Good catch, I think it was a leftover from the previous approach of updating the env file. Fixed now to use proper export syntax. |
|
it is a good idea to redirect the output from launching bitwarden into null, it outputs a lot of debug info to the terminal. The check for
|
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
changed it accordingly
Good idea, also user might already have set this to use e.g. |
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| echo "Installing Bitwarden..." | ||
| omarchy-pkg-add bitwarden bitwarden-cli | ||
|
|
||
| env_file=$HOME/.config/uwsm/env |
There was a problem hiding this comment.
Don't think we need to set it this high up in the stack. I think using a regular bashrc env should be fine, no?
There was a problem hiding this comment.
hm had probably copied it over from my ssh-agent implementation where it was needed because that agent is started via systemd. Want me to change it to .bashrc?
There was a problem hiding this comment.
Turns out this is not working in .bashrc e.g. for VSCode (started via Walker), so probably same for all apps not started via interactive shell. Better keeping it in .config/uwsm/env then.
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… agent configuration" This reverts commit 3e6dd97.
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
superseded by #6719 for Quattro |
Bitwarden can also be used as SSH agent