dot/.znewterm

49 lines
1.1 KiB
Plaintext
Raw Normal View History

# Initializations to be done on a new terminal. This is
# called both from .zlogin and .zshrc
# default initialization
if [ -r /usr/local/lib/profile-parts/term ]
then
. /usr/local/lib/profile-parts/term
fi
# terminal customization
if [[ .$TERM. = .console. ]]
then
# Linux console
TERM=vt200
stty rows 25 cols 80
fi
if [[ .$TERM. = .vt200. ]]
then
# vt200 not known here
TERM=vt100
stty erase 
fi
2009-10-12 14:30:26 +02:00
if [[ $TERM = xterm || $TERM = xterm-256color ]]
then
2008-08-06 15:47:30 +02:00
# indicated exit status by smiley (suggested by Stig Sandbeck Mathisen)
smiley="%b%(0?,%{%}:-),%{%}:-()%{%}%B"
prompt="%{]0;%m(%l)%n %~%}%B%m:%~ %T $smiley %h%# %b"
unsetopt PRINT_EXIT_VALUE
2005-02-03 17:13:40 +01:00
# force backspace key to send BS:
# warning: This works with real xterm and rxvt
# it doesn't work with konsole or gnome-terminal.
echo -n '[?67h'
2005-02-03 17:13:40 +01:00
stty erase 
2009-06-10 21:10:20 +02:00
if [ -f ~/.zxtermcolors ]
then
. ~/.zxtermcolors
else
perl -e 'printf(qq{if whence xtermcontrol >/dev/null\nthen\nxtermcontrol --bg "#%02X%02X%02X"\nfi\n}, map { rand(128)+128 } qw(1 1 1))' > ~/.zxtermcolors
fi
else
prompt="%B%m:%~ %T %h%# %b"
fi
1996-02-22 14:33:43 +01:00
export PROMPT
znewtermexecuted=true