This commit is contained in:
Morten Olsen
2023-09-16 22:59:04 +02:00
parent 33f79566b7
commit a7bfa09045
14 changed files with 61 additions and 67 deletions

View File

@@ -1,6 +0,0 @@
if hash bat &> /dev/null; then
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
export BAT_THEME="MonokaiExtended"
alias cat="bat"
fi

View File

@@ -1,8 +0,0 @@
export TMPDIR=${TMPDIR:-/tmp}
if ! pgrep -U "$UID" ssh-agent > /dev/null; then
ssh-agent > "$XDG_RUNTIME_DIR/ssh-agent.env"
fi
if [[ ! "$SSH_AUTH_SOCK" ]]; then
eval "$(<"$XDG_RUNTIME_DIR/ssh-agent.env")"
fi

View File

@@ -1,26 +0,0 @@
function _bw_replace_env() {
env | while IFS= read -r line; do
value=${line#*=}
name=${line%%=*}
if [[ $value = bw://* ]]; then;
item=${value:5}
secret=`bw get password $item`
export $name="$secret"
fi
done
}
function clam-open() {
command=$1
if [[ -z "$BW_SESSION" ]]; then;
export BW_SESSION=`bw unlock --raw`
fi
_bw_replace_env
if [[ ! -z "$command" ]]; then;
eval $command
fi
}
function clam-close() {
unset BW_SESSION
}