# Setup locale and encoding
if [ -e ~/.ConfigScripts.debug ]; then
- echo " - TERM=\"$TERM\""
- echo " - LANG=\"$LANG\""
- echo " - LC_CTYPE=\"$LC_CTYPE\""
+ echo " - TERM=\"$TERM\""
+ echo " - LANG=\"$LANG\""
+ echo " - LC_CTYPE=\"$LC_CTYPE\""
fi
# Does LC_CTYPE or LANG indicate an UTF-8 terminal?
LC_encoding=""
LC_encoding="ISO8859-1"
esac
fi
-[ -e ~/.ConfigScripts.debug ] && echo " - LC_encoding=\"$LC_encoding\" (temp)"
+[ -e ~/.ConfigScripts.debug ] && echo " - LC_encoding=\"$LC_encoding\" (temp)"
# Set locale if it is not set or doesn't contain a dot:
[ "$LANG" = "${LANG#*.}" -a "$LANG" != "C" ] \
&& export LANG="${LANG:-de_DE}.${LC_encoding}"
-[ -e ~/.ConfigScripts.debug ] && echo " - LANG=\"$LANG\" (new)"
+[ -e ~/.ConfigScripts.debug ] && echo " - LANG=\"$LANG\" (new)"
# Clean up ...
unset LC_CTYPE LC_encoding 2>/dev/null
*) return ;;
esac
+# Use "xterm-256color" for xterm's (and the like) when it is available
+[ "$TERM" = "xterm" -a -r "/usr/share/terminfo/x/xterm+256color" ] \
+ && export TERM="xterm-256color"
+
# validate terminal definition
type -t tset >/dev/null && eval `tset -s -Q`
# Reminders (once every 60 minutes)
if [ -z `find ~/.last_reminder -mmin -60 2>/dev/null` ]; then
- [ -e ~/.ConfigScripts.debug ] && echo " - Reminders ..."
- if [ "$(type -t icalBuddy >/dev/null)" -a "$LOGNAME" != "root" ]; then
+ [ -e ~/.ConfigScripts.debug ] && echo " - Reminders ..."
+ if [ "$(type -t icalBuddy 2>/dev/null)" -a "$LOGNAME" != "root" ]; then
# icalBuddy(1)
case "$LANG" in
*.UTF*) bul="•"; bul_imp="!"; sep="»"; ;;
eventsToday+1 2>/dev/null
[ $? -eq 0 ] && echo
unset bul bul_imp sep
+ [ -w ~/ ] && touch ~/.last_reminder
else
# remind(1)
- if [ "$(type -t remind >/dev/null)" -a -r ~/.remind ]; then
+ if [ "$(type -t remind 2>/dev/null)" -a -r ~/.remind ]; then
remind -h -g -t5 ~/.remind | \
grep -v '^Reminders for ' | grep -v '^$'
[ $? -eq 0 ] && echo
fi
+ [ -w ~/ ] && touch ~/.last_reminder
fi
- [ -w ~/ ] && touch ~/.last_reminder
fi
# bash-specific initialization