2021-04-28 16:58:24 +02:00
#!/bin/env bash
2021-03-05 12:54:41 +01:00
# Start GPG and SSH agents
export GPG_TTY=$(tty)
eval $(gpg-agent --daemon --enable-ssh-support --write-env-file "${HOME}/.gpg-agent-info")
if [ -f "${HOME}/.gpg-agent-info" ]; then
# gpg-agent[****]: WARNING: "--write-env-file" is an obsolete
# option - it has no effect
. "${HOME}/.gpg-agent-info"
export GPG_AGENT_INFO
export SSH_AUTH_SOCK
export SSH_AGENT_PID
else
echo "Howdy, user ID ${EUID}. Shenanigans beget shenanigans."
# not needed this because we have .ssh/config
# but keep this uncommented because Git is being
# an dougebag in every single shell sessiob.
source ~/.dotfiles/bin/source-ssh-agent
fi
# Then add my scripts
export DOTFILES_STUFF_BIN="$HOME/.dotfiles/bin"
2021-05-31 17:36:09 +02:00
export PATH=$PATH:$DOTFILES_STUFF_BIN:$HOME/.local/bin
2021-04-13 09:29:36 +02:00
export DOTFILES_HOME=$HOME/.dotfiles
2021-04-05 11:44:55 +02:00
# clean up bash history
2021-04-09 10:59:52 +02:00
#echo
#rm -rf ~/.bash_history>>/dev/null && history -c && echo "history-cleanup: Shell history cleaned for past session" || echo "history-cleanup: No bash_history file found for past session."
2021-04-06 11:38:02 +02:00
2021-04-09 10:59:52 +02:00
# then do chain sourcing
source ~/.dotfiles/bashrc/chain-source
2021-04-25 10:02:26 +02:00
2021-05-17 08:26:49 +02:00
# check if thefuck Python3 package is there in case I really
# fricked the commands.
2021-04-25 10:02:26 +02:00
TF_PYTHON_PATH=$(command -v thefuck)
if [[ $TF_PYTHON_PATH != "" ]];then
2021-05-17 08:26:49 +02:00
eval $(thefuck --alias fuckwit)
eval $(thefuck --alias what-the-fuck)
eval $(thefuck --alias holy-shit)
eval $(thefuck --alias stfu)
eval $(thefuck --alias fuck)
eval $(thefuck --alias bullshit)
2021-04-25 10:02:26 +02:00
fi
# Export my Cloudflare API keys
2021-06-09 13:42:25 +02:00
#source ~/.dotfiles/secrets/cloudflare.api-keys
2021-04-25 10:02:26 +02:00
# do console cleanup
2021-05-02 06:19:43 +02:00
#clear