summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2010-03-05 03:37:41 +0100
committerAdrian C. (anrxc) <anrxc@sysphere.org>2010-03-05 03:39:02 +0100
commit1c0af40653fb20eeeb569cae7d6e23a80c60ded8 (patch)
treedd3c4ddf0cc6c2b9039c0d05dc6a67d93f6c8666
parent2bda9018c3c3441ba8d66e28711e0f9dafe66ac0 (diff)
downloaddotfiles-1c0af40653fb20eeeb569cae7d6e23a80c60ded8.tar.xz
zshrc: remove titlebar and prompt cruft
-rw-r--r--zshrc45
1 files changed, 9 insertions, 36 deletions
diff --git a/zshrc b/zshrc
index 68527f9..aef6c63 100644
--- a/zshrc
+++ b/zshrc
@@ -25,12 +25,6 @@ export MAILCHECK=300
export GPGKEY="0xD20A0618"
# }}}
-# {{{ Compiler flags
-#export CHOST="i686-pc-linux-gnu"
-#export CFLAGS="-O2 -march=athlon-xp -mcpu=i686 -pipe -fomit-frame-pointer"
-#export CXXFLAGS="${CFLAGS}"
-# }}}
-
# {{{ Dircolors
# - with rxvt-256color support
eval `dircolors -b "${HOME}/.dir_colors"`
@@ -202,13 +196,11 @@ function dsync () { rsync -lprt --progress --stats --delete "$1/" "$2/" }
function snap () {
[ "$2" ] && tmout="$2" || tmout=5
[ "$3" ] && format="$3" || format=png
- stamp=`date +%d%m%y-%H%M`
- echo -n "Snapshot in "
- for ((i=${tmout}; i >= 1; i--)) do; echo -n "${i}.. "; sleep 1; done
- import -window root -quality 100 "${HOME}/$1-${stamp}.${format}"
- convert -resize "15%" -quality 100 "${HOME}/$1-${stamp}.${format}" \
- "${HOME}/$1-${stamp}.th.${format}"
- echo "saved as: ${HOME}/$1-${stamp}.${format}"
+ fname="${HOME}/$1-`date +%d%m%y-%H%M`"
+ for ((i=${tmout}; i>=1; i--)) do; echo -n "${i}.. "; sleep 1; done
+ import -window root -quality 100 "${fname}.${format}"
+ convert -resize "15%" "${fname}.${format}" "${fname}.th.${format}"
+ echo ": ${fname}.${format}"
}
function extract () {
@@ -283,16 +275,6 @@ function setprompt () {
PR_LRCORNER="${altchar[j]:--}"
PR_URCORNER="${altchar[k]:--}"
- # Terminal specific settings and titlebar text
- case "${TERM}" in
- rxvt*)
- PR_TITLEBAR=$'%{\e]0;%n@%m:%~ | ${COLUMNS}x${LINES} | %y\a%}'
- ;;
- screen*)
- PR_TITLEBAR=$'%{\e_screen \005 (\005t) | %n@%m:%~ | ${COLUMNS}x${LINES} | %y\e\\%}'
- ;;
- esac
-
# Terminal prompt settings
case "${TERM}" in
dumb) # Simple prompt for dumb terminals
@@ -318,25 +300,16 @@ function setprompt () {
echo -en "\e]PFffffff" # bright-white (white)
PROMPT='$PR_GREEN%n@%m$PR_WHITE:$PR_YELLOW%l$PR_WHITE:$PR_RED%~$PR_YELLOW%%$PR_NO_COLOUR '
;;
- *) # Main prompt:
- # * (user@hostname:tty)--($PWD) and an exit code of the last command
- # * Right hand prompt which makes room if command line grows past it
- # * The PS2 continuation prompt, that matches PS1 in color and style
- PROMPT='$PR_SET_CHARSET$PR_STITLE${(e)PR_TITLEBAR}\
-$PR_GREEN$PR_SHIFT_IN$PR_ULCORNER$PR_GREEN$PR_HBAR$PR_SHIFT_OUT(\
-$PR_GREEN%(!.%SROOT%s.%n)$PR_GREEN@%m$PR_WHITE:$PR_YELLOW%l\
-$PR_GREEN)$PR_SHIFT_IN$PR_HBAR$PR_GREEN$PR_HBAR${(e)PR_FILLBAR}$PR_GREEN$PR_HBAR$PR_SHIFT_OUT(\
+ *) # Main prompt
+ PROMPT='$PR_SET_CHARSET$PR_GREEN$PR_SHIFT_IN$PR_ULCORNER$PR_GREEN$PR_HBAR\
+$PR_SHIFT_OUT($PR_GREEN%(!.%SROOT%s.%n)$PR_GREEN@%m$PR_WHITE:$PR_YELLOW%l$PR_GREEN)\
+$PR_SHIFT_IN$PR_HBAR$PR_GREEN$PR_HBAR${(e)PR_FILLBAR}$PR_GREEN$PR_HBAR$PR_SHIFT_OUT(\
$PR_RED%$PR_PWDLEN<...<%~%<<$PR_GREEN)$PR_SHIFT_IN$PR_HBAR$PR_GREEN$PR_URCORNER$PR_SHIFT_OUT\
$PR_GREEN$PR_SHIFT_IN$PR_LLCORNER$PR_GREEN$PR_HBAR$PR_SHIFT_OUT(\
%(?..$PR_RED%?$PR_WHITE:)%(!.$PR_RED.$PR_YELLOW)%#$PR_GREEN)$PR_NO_COLOUR '
RPROMPT=' $PR_GREEN$PR_SHIFT_IN$PR_HBAR$PR_GREEN$PR_LRCORNER$PR_SHIFT_OUT$PR_NO_COLOUR'
-
- PS2='$PR_GREEN$PR_SHIFT_IN$PR_HBAR$PR_SHIFT_OUT\
-$PR_GREEN$PR_SHIFT_IN$PR_HBAR$PR_SHIFT_OUT(\
-$PR_YELLOW%_$PR_GREEN)$PR_SHIFT_IN$PR_HBAR$PR_SHIFT_OUT\
-$PR_GREEN$PR_SHIFT_IN$PR_HBAR$PR_SHIFT_OUT$PR_NO_COLOUR '
;;
esac
}