From dd68dbf20956a7005a47682b3992450004298e71 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 26 Feb 2009 21:33:53 +0100 Subject: zprofile: Use zlogin... --- .links | 1 + etc/login | 4 ++++ etc/profile | 20 +++++--------------- etc/prompt | 6 +++++- etc/rc | 3 --- 5 files changed, 15 insertions(+), 19 deletions(-) create mode 100644 etc/login diff --git a/.links b/.links index 5882588..e6a1981 100644 --- a/.links +++ b/.links @@ -1,3 +1,4 @@ soft .zshrc packages/zsh/etc/rc soft .zprofile packages/zsh/etc/profile +soft .zlogin packages/zsh/etc/login soft .zshenv packages/zsh/etc/env diff --git a/etc/login b/etc/login new file mode 100644 index 0000000..1589f27 --- /dev/null +++ b/etc/login @@ -0,0 +1,4 @@ +## vim:ft=zsh +check_com -c todo && [[ -r ~/var/gtd/todo ]] && gtd-todo +check_com -c calendar && [[ -r ~/stuff/calendar ]] && calendar +unset ZPROFILE diff --git a/etc/profile b/etc/profile index 823ffb0..23994c3 100644 --- a/etc/profile +++ b/etc/profile @@ -1,16 +1,6 @@ ## vim:ft=zsh - -# a part of this file uses functions loaded by the zshrc, which is parsed -# after zprofile by default. So, at the end of the zshrc, zprofile is sourced -# again and the section after the else is executed -if (( ZPROFILE == 0 )) { - source $HOME/packages/zsh/etc/colors - print -P "${info}>>${reset} this is ${info}$(uname -srm)${reset} on ${info}%y${reset}" - [[ -n $(echo Maildir/new/*(N)) ]] && echo "${info}>>${reset} You have mail!" - [[ -r $HOME/packages/zsh/etc/local-profile ]] && source $HOME/packages/zsh/etc/local-profile - ZPROFILE=1 -} else { - check_com -c todo && [[ -r ~/var/gtd/todo ]] && gtd-todo - check_com -c calendar && [[ -r ~/stuff/calendar ]] && calendar - unset ZPROFILE -} +source $HOME/packages/zsh/etc/colors +print -P "${info}>>${reset} this is ${info}$(uname -srm)${reset} on ${info}%y${reset}" +[[ -n $(echo Maildir/new/*(N)) ]] && echo "${info}>>${reset} You have mail!" +[[ -r $HOME/packages/zsh/etc/local-profile ]] && source $HOME/packages/zsh/etc/local-profile +ZPROFILE=1 diff --git a/etc/prompt b/etc/prompt index c16dbaf..2cdfc8b 100644 --- a/etc/prompt +++ b/etc/prompt @@ -14,7 +14,11 @@ sign="${ps_sign}%(?.${sign}.%?)${ps_reset}" screen=$'%{\ek\e\\%}' PS1="${host} ${dir} ${sign} ${screen}" -RPS1="${ps_yellow}[${ps_info}%1v${ps_yellow}%T]${ps_reset}" +RPS1="${ps_yellow}[${ps_info}%1v${ps_yellow}" +if [[ $TERM != screen ]] { + RPS1+='%T' +} +RPS1+="]${ps_reset}" unset user at host unset dir ps_sign sign screen diff --git a/etc/rc b/etc/rc index 7e12f54..7e143f9 100644 --- a/etc/rc +++ b/etc/rc @@ -34,9 +34,6 @@ xsource $HOME/var/tmp/envstore-raw-$UID # envstore xsource $ZDIR/hosts/$HOST # local configuration in git source $ZDIR/completion -# Run the parts of .zprofile which require the setup done by .zshrc -(( ZPROFILE )) && source $ZDIR/profile - # misc check_com -c dircolors && eval $(dircolors -b $HOME/packages/zsh/etc/dircolors) mesg n -- cgit v1.2.3