Change various things

This commit is contained in:
crater2150 2024-11-27 12:14:40 +01:00
parent 281ea9f354
commit 8a9503b95a
7 changed files with 21 additions and 8 deletions

16
zshrc
View file

@ -29,13 +29,16 @@ fpath=($ZDOTDIR/functions $fpath)
function exists { command -v "$@" >/dev/null }
# get a file from ZDOTDIR, return file in /etc/zsh if it does not exist
# get a file from ZDOTDIR, return file in /etc/zsh if it does not exist. If both
# don't exist, return the first of them.
zdotfile() {
if [[ -e $ZDOTDIR/$1 ]]; then
echo $ZDOTDIR/$1
else
echo /etc/zsh/$1
fi
if [[ -e $ZDOTDIR/$1 ]]; then
echo $ZDOTDIR/$1
elif [[ -e /etc/zsh/$1 ]]; then
echo /etc/zsh/$1
else
echo $ZDOTDIR/$1
fi
}
try-source() {
local i=0
@ -109,6 +112,7 @@ if [[ -e $HOME/.calendars ]]; then
fi
if exists mail; then
MAILCHECK=0
_prompt_cron_mails() {
[[ ! -e $MAIL ]] && return
local newmails=$(mail -Hf $MAIL | grep -c '^.N')