diff --git a/.config/shell/logout.sh b/.config/shell/logout.sh index 7e58a45..85fc2ff 100644 --- a/.config/shell/logout.sh +++ b/.config/shell/logout.sh @@ -1,10 +1,18 @@ # This file is sourced by a login shell upon logout -# Clear the screen to increase privacy +# Clear the screen (if desired) to increase privacy if [ "$SHLVL" = 1 ]; then if [ -x /usr/bin/clear ]; then - /usr/bin/clear + read -p "Clear screen? " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + /usr/bin/clear + fi elif [ -x /usr/bin/clear_console ]; then - /usr/bin/clear_console -q + read -p "Clear screen? " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + /usr/bin/clear_console -q + fi fi fi