|
|
@@ -430,25 +430,23 @@ __my_prompt_function(){ # used by PS1 |
|
|
|
fi |
|
|
|
# local battery=$(battery-state [%s] | sed -e 's`%`%%`g') # very slow |
|
|
|
|
|
|
|
# __my_set_title ${USER}@${HOSTNAME} ${PWD} |
|
|
|
|
|
|
|
printf " [${c1}${pwd}${cdef}<${c3}${oldpwd}${cdef}]${git}${svn}${battery}${ip}\n" |
|
|
|
printf "${c2}${USER}@${HOSTNAME}${cdef} ${date}\n" |
|
|
|
printf "shlv:${SHLVL} jobs:${jobnum} dirs:${dirs} last:${lastreturn} " |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
__my_set_title(){ |
|
|
|
title="$(echo $@)" |
|
|
|
case $TERM in |
|
|
|
rxvt*|xterm*|aterm) |
|
|
|
test -t 1 && |
|
|
|
test -n "$DISPLAY" && |
|
|
|
test -z "$EMACS" && |
|
|
|
echo -n -e "\033]0;${title}\007" |
|
|
|
;; |
|
|
|
case $TERM in |
|
|
|
(rxvt*|xterm*|aterm) |
|
|
|
test -t 1 && |
|
|
|
test -n "$DISPLAY" && |
|
|
|
test -z "$EMACS" && |
|
|
|
echo -n -e "\033]0;${1}\007" |
|
|
|
;; |
|
|
|
esac |
|
|
|
} |
|
|
|
PROMPT_COMMAND="__my_set_title \${USER}@\${HOSTNAME}\ \${PWD};${PROMPT_COMMAND}" |
|
|
|
|
|
|
|
# from https://wiki.archlinux.org/index.php/X_resources |
|
|
|
invader(){ |
|
|
|