Last active
June 2, 2016 20:12
-
-
Save nkanaev/2668d20ae1e9c4abc31d65f7cf0d801e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
bsod_win9x() { | |
NUM_COLUMNS=$(tput cols) | |
NUM_ROWS=$(tput lines) | |
HEADER_OFFSET_X=$(($NUM_COLUMNS / 2 - 4)) | |
HEADER_OFFSET_Y=$(($NUM_ROWS / 2 - 3)) | |
TEXT_OFFSET=$(($NUM_COLUMNS / 2 - 37)) | |
clear | |
echo -e "\x1b[${HEADER_OFFSET_Y};${HEADER_OFFSET_X}f" "\x1b[30;47m Windows \x1b[0m\n" | |
echo -e "\x1b[${TEXT_OFFSET}C" "An error has occured. To continue:\n" | |
echo -e "\x1b[${TEXT_OFFSET}C" "Press Enter to return to Windows, or\n" | |
echo -e "\x1b[${TEXT_OFFSET}C" "Press CTRL+ALT+DEL to restart your computer. If you do this," | |
echo -e "\x1b[${TEXT_OFFSET}C" "you will lose any unsaved information in all open applications.\n" | |
echo -e "\x1b[${TEXT_OFFSET}C" "Error: 0E : 016F : BFF9B3D4\n" | |
echo -ne "\x1b[$(($NUM_COLUMNS / 2 - 15))C" "Press any key to continue " | |
read -sn 1 | |
clear | |
} | |
bsod_win9x | |
trap 'bsod_win9x' WINCH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment