dot

packages and services management
Log | Files | Refs | README

commit bbe12d8fcd21cecb9874c19af08b597f65e41015
parent 7296e6d87726838ba25304f8ef00c39b4bf76ee7
Author: josuah <mail@josuah.net>
Date:   Wed,  5 Oct 2016 20:07:36 -0400

Fixed profile and tmux conf

Diffstat:
Mshell/.profile | 36++++++++++--------------------------
Mtmux/.config/tmux/status | 2+-
2 files changed, 11 insertions(+), 27 deletions(-)

diff --git a/shell/.profile b/shell/.profile @@ -38,13 +38,21 @@ $(sed -r '/^ *#/ d; /^ *$/ d; s/@/$/g; s/ *([^ ]*) *[^ ]*=/\1=/' \ ~/.pam_environment) EOF +export PATH="$CONFIG/bin:$LOCAL/bin:$PATH" + export PS1="$( + code="$?" + + # Error code + [ "$code" -eq 0 ] || printf '\033[62C\033[31;1m %s \033[0m\r' "$code" printf '\n \033[1;31m>\033[33m>\033[34m>\033[0m ' - tmux set status off; tmux set status on + + # Update tmux status at each prompt + tmux set status off + tmux set status on )" export PS2='| ' -export PATH="$CONFIG/bin:$LOCAL/bin:$PATH" # ALIAS @@ -70,30 +78,6 @@ alias myip='curl icanhazip.com' # FUNCTIONS #------------------------------------------------------------------------------- -ps1() -{ - local code="$?" - - printf '\n' - - # Date - printf "\033[74C %s\r" "$(date +'%H:%M')" - - # PWD with $HOME replaced by ~ - [ "${pwd##$HOME**}" ] && local pwd="$PWD" || local pwd="~${PWD#$HOME}" - printf '\033[1m%s\033[0m ' "$pwd" - - # Git branch and status - - printf '\r' - - # Error code - [ "$code" -eq 0 ] || printf '\033[62C\033[31;1m %s \033[0m\r' "$code" - - # Last line for prompt - printf '\n$ ' -} - h() { for field in $@; do local cmd="$cmd $field"; done diff --git a/tmux/.config/tmux/status b/tmux/.config/tmux/status @@ -36,7 +36,7 @@ segment_mail() { local count='' inbox='' - count="$(find "$MAIL/new" -mindepth 1 2>/dev/null | wc -l)" + count="$(find "$MAIL/new" -type f 2>/dev/null | wc -l)" [ "$count" -le 0 ] && count='' || mail='mail' printf '%s\n' red "$mail" "$count"