dootfiles/.shell-logout

28 lines
585 B
Text
Raw Permalink Normal View History

2024-03-14 21:49:14 -04:00
# vim: set ft=sh sw=2 et :
# when leaving the console clear the screen to increase privacy
if [ "$SHLVL" = 1 ]; then
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi
# When leaving the console clear the screen to increase privacy. Also clear the
# scroll-back buffer by switching to tty63 and back.
case "$(tty)" in
/dev/tty[0-9])
t=$(v=`tty` ; echo ${v##*ty})
clear
chvt 63; chvt "$t"
;;
/dev/tty[0-9][0-9])
t=$(v=`tty` ; echo ${v##*ty})
clear
chvt 63; chvt "$t"
;;
*)
;;
esac