diff options
Diffstat (limited to 'bashrc')
-rw-r--r-- | bashrc | 55 |
1 files changed, 12 insertions, 43 deletions
@@ -1,50 +1,19 @@ #!/usr/bin/bash -c_off='\e[0m' -c_bold='\e[1m' -c_black='\e[30m' -c_red='\e[31m' -c_green='\e[32m' -c_yellow='\e[33m' -c_blue='\e[34m' -c_purple='\e[35m' -c_cyan='\e[36m' -c_white='\e[37m' - export HISTSIZE=10000 export HISTTIMEFORMAT="%y-%m-%d %T " -source /usr/share/git/completion/git-prompt.sh - -if [ "$TERM" == "st-256color" ]; then - # Quick fix for ctrl+arrow key in st - echo $(tput smkx) > /dev/tty -fi - -############### -PS1="${c_bold}${c_yellow}\ -┌[${c_green}\u${c_yellow}@${c_blue}\h${c_yellow}][${c_purple}\W${c_yellow}"'$(__git_ps1 " (%s)")'"] ${c_black}<\d \t>${c_yellow}\n\ -└╼ \[${c_off}\]" -############### - -source ~/.aliases -source ~/.environment - -echo Running $(uname) $(uname -r) on $(uname -n) \($(uname -m)\) - -if [ -f ~/todo ]; then - echo To do: - cat ~/todo -fi - -if [ -f ~/.cache/weather/forecast ]; then - echo "" - echo Weather: - cat ~/.cache/weather/forecast | while read -r l ; do echo " "$l ; done -fi +case $- in + *i*) + # interactive, continue fancy stuff. Printing anything when a + # non-interactive session is active breaks scp and other utils + source ~/.aliases + source ~/.environment -[ -d ~/Maildir/new/ ] && [ "$(ls ~/Maildir/new/)" ] && echo 'New mail' + echo Running $(uname) $(uname -r) on $(uname -n) \($(uname -m)\) + ;; + *) + # non-interactive, don't do anything fancy + ;; +esac -[ -z "$(ls -A ~/.cache/currency 2>/dev/null)" ] || for c in ~/.cache/currency/* ; do - echo "$(cat $c) (at $(date -d $(stat -c %Y $c) +"%a %d %H:%M"))" -done |