diff --git a/README.md b/README.md index ef2284d..a8c2fa2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # config -Various config files I use. +Various config files and small scripts I use. + +TODO: Set up ansible so they can be very quickly installed on new systems and such. diff --git a/bash_aliases b/bash/2line_prompt.sh similarity index 62% rename from bash_aliases rename to bash/2line_prompt.sh index 78a28b4..f89d35a 100644 --- a/bash_aliases +++ b/bash/2line_prompt.sh @@ -1,13 +1,10 @@ -export PATH=~/bin:$PATH -export EDITOR="/usr/bin/emacs -nw" -export LD_PRELOAD="/home/anna/.local/lib64/stderred.so" - -alias unlock="lpass show -c --password" -alias arduino-serial="cu -l /dev/ttyACM0 -s 115200" -alias emacs="/usr/bin/emacs -nw" -alias grep='LC_ALL="C" grep' -alias bt='transmission-remote' -alias git='hub' +# Produces a nice, colorful 2-line prompt, basically of the form: +# [username@hostname]-[current_directory] +# $ +# +# Also includes a [x] on the first line if the last command returned false. +# +# TODO: add current git branch function fancy_ps1 () { local COLOR1="\033[1;32m" @@ -19,5 +16,3 @@ function fancy_ps1 () { } PS1="\[\033[0;37m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[0;31m\]\h'; else echo '\[\033[0;33m\]\u\[\033[0;37m\]@\[\033[0;96m\]\h'; fi)\[\033[0;37m\]]\342\224\200\$(fancy_ps1)\[\033[0;37m\]\n\[\033[0;37m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]" - -export GPG_TTY=$(tty) diff --git a/bash/README.md b/bash/README.md new file mode 100644 index 0000000..99ba7c1 --- /dev/null +++ b/bash/README.md @@ -0,0 +1,9 @@ +Snippets you can source from your `.bash_profile`. + +To install them all, copy them to ~/.bash.d and add this to your shell init script: + +``` +for partial in $(ls ~/.bash.d/*.sh); do + source $partial +done +``` diff --git a/bash/emacs.sh b/bash/emacs.sh new file mode 100644 index 0000000..67aba77 --- /dev/null +++ b/bash/emacs.sh @@ -0,0 +1,3 @@ +# Make emacs the default editor, default to non-gui mode. +alias emacs="/usr/bin/emacs -nw" +export EDITOR="/usr/bin/emacs -nw" diff --git a/bash/misc_aliases.sh b/bash/misc_aliases.sh new file mode 100644 index 0000000..3b0fbe7 --- /dev/null +++ b/bash/misc_aliases.sh @@ -0,0 +1,5 @@ +alias unlock="lpass show -c --password" +alias arduino-serial="cu -l /dev/ttyACM0 -s 115200" +alias grep='LC_ALL="C" grep' +alias bt='transmission-remote' +alias git='hub'