Clean up bash config
parent
6608397413
commit
c8d06cc71c
@ -1,75 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Reset
|
||||
color_off='\e[0m' # Text Reset
|
||||
|
||||
# Regular Colors
|
||||
black='\e[0;30m' # Black
|
||||
red='\e[0;31m' # Red
|
||||
green='\e[0;32m' # Green
|
||||
yellow='\e[0;33m' # Yellow
|
||||
blue='\e[0;34m' # Blue
|
||||
purple='\e[0;35m' # Purple
|
||||
cyan='\e[0;36m' # Cyan
|
||||
white='\e[0;37m' # White
|
||||
|
||||
# Bold
|
||||
bblack='\e[1;30m' # Black
|
||||
bred='\e[1;31m' # Red
|
||||
bgreen='\e[1;32m' # Green
|
||||
byellow='\e[1;33m' # Yellow
|
||||
bblue='\e[1;34m' # Blue
|
||||
bpurple='\e[1;35m' # Purple
|
||||
bcyan='\e[1;36m' # Cyan
|
||||
bwhite='\e[1;37m' # White
|
||||
|
||||
# Underline
|
||||
ublack='\e[4;30m' # Black
|
||||
ured='\e[4;31m' # Red
|
||||
ugreen='\e[4;32m' # Green
|
||||
uyellow='\e[4;33m' # Yellow
|
||||
ublue='\e[4;34m' # Blue
|
||||
upurple='\e[4;35m' # Purple
|
||||
ucyan='\e[4;36m' # Cyan
|
||||
uwhite='\e[4;37m' # White
|
||||
|
||||
# Background
|
||||
on_black='\e[40m' # Black
|
||||
on_red='\e[41m' # Red
|
||||
on_green='\e[42m' # Green
|
||||
on_yellow='\e[43m' # Yellow
|
||||
on_blue='\e[44m' # Blue
|
||||
on_purple='\e[45m' # Purple
|
||||
on_cyan='\e[46m' # Cyan
|
||||
on_white='\e[47m' # White
|
||||
|
||||
# High Intensty
|
||||
iblack='\e[0;90m' # Black
|
||||
ired='\e[0;91m' # Red
|
||||
igreen='\e[0;92m' # Green
|
||||
iyellow='\e[0;93m' # Yellow
|
||||
iblue='\e[0;94m' # Blue
|
||||
ipurple='\e[0;95m' # Purple
|
||||
icyan='\e[0;96m' # Cyan
|
||||
iwhite='\e[0;97m' # White
|
||||
|
||||
# Bold High Intensty
|
||||
biblack='\e[1;90m' # Black
|
||||
biRed='\e[1;91m' # Red
|
||||
biGreen='\e[1;92m' # Green
|
||||
biYellow='\e[1;93m' # Yellow
|
||||
biBlue='\e[1;94m' # Blue
|
||||
biPurple='\e[1;95m' # Purple
|
||||
biCyan='\e[1;96m' # Cyan
|
||||
biWhite='\e[1;97m' # White
|
||||
|
||||
# High Intensty backgrounds
|
||||
on_iblack='\e[0;100m' # Black
|
||||
on_ired='\e[0;101m' # Red
|
||||
on_igreen='\e[0;102m' # Green
|
||||
on_iyellow='\e[0;103m' # Yellow
|
||||
on_iblue='\e[0;104m' # Blue
|
||||
on_ipurple='\e[10;95m' # Purple
|
||||
on_icyan='\e[0;106m' # Cyan
|
||||
on_iwhite='\e[0;107m' # White
|
||||
|
@ -1,11 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
_direnv_hook() {
|
||||
eval "$(direnv export bash)";
|
||||
};
|
||||
|
||||
if [[ -x $(command -v direnv) ]]; then
|
||||
if ! [[ "$PROMPT_COMMAND" =~ _direnv_hook ]]; then
|
||||
PROMPT_COMMAND="_direnv_hook;$PROMPT_COMMAND";
|
||||
fi
|
||||
fi
|
@ -1,26 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
function tmp-if-needed {
|
||||
tmpdir=/tmp/ssh-env-$(whoami)
|
||||
[[ -d $tmpdir ]] || mkdir $tmpdir
|
||||
chmod 700 "$tmpdir"
|
||||
chown $(whoami) "$tmpdir"
|
||||
echo $tmpdir
|
||||
}
|
||||
|
||||
ENVFILE="${XDG_RUNTIME_DIR:-$(tmp-if-needed)}/ssh-agent.env"
|
||||
|
||||
if [ -f $ENVFILE ] ; then
|
||||
. $ENVFILE > /dev/null
|
||||
if ! kill -0 $SSH_AGENT_PID > /dev/null 2>&1; then
|
||||
eval $(ssh-agent | tee $ENVFILE)
|
||||
chmod 600 "$ENVFILE"
|
||||
chown $(whoami) "$ENVFILE"
|
||||
ssh-add
|
||||
fi
|
||||
else
|
||||
eval $(ssh-agent | tee $ENVFILE)
|
||||
chmod 600 "$ENVFILE"
|
||||
chown $(whoami) "$ENVFILE"
|
||||
ssh-add
|
||||
fi
|
Loading…
Reference in New Issue