aboutsummaryrefslogtreecommitdiffstats
path: root/bashrc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bashrc15
1 files changed, 11 insertions, 4 deletions
diff --git a/bashrc b/bashrc
index d0e0364..bba3c68 100644
--- a/bashrc
+++ b/bashrc
@@ -11,7 +11,7 @@ fi
# export PS1='bash-\v-\u@\h \W\$ '
# export PS1='\[\033[38;5;208m\]\u@\h:\w\$\[\033[0m\] '
-export PS1='\[\033[01;32m\]$\u@\h:\w\$\[\033[0m\] '
+export PS1='\[\033[01;32m\]\u@\h:\w\$\[\033[0m\] '
# vi mode
#set -o vi
@@ -29,7 +29,7 @@ export EDITOR=vim
# export VISUAL="emacsclient -c -a emacs" # $VISUAL opens in GUI mode
# openai keys
-source $HOME/dotfiles/openai_key
+source $HOME/Documents/sync/openai_key
# aliases
alias pacget="pacman -Slq | fzf --multi --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S"
@@ -87,10 +87,17 @@ source /usr/share/fzf/key-bindings.bash
source /usr/share/fzf/completion.bash
# gpg
-export=GPG_TTY="$(tty)"
-export=SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
+export GPG_TTY="$(tty)"
gpgconf --launch gpg-agent
+# ssh - from https://wiki.archlinux.org/title/SSH_keys#SSH_agents
+if ! pgrep -u "$USER" ssh-agent > /dev/null; then
+ ssh-agent -t 1h > "$XDG_RUNTIME_DIR/ssh-agent.env"
+fi
+if [[ ! -f "$SSH_AUTH_SOCK" ]]; then
+ source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
+fi
+
# bind '"\C-r": "\C-x1\e^\er"'
# bind -x '"\C-x1": __fzf_history';