will8211 / unimatrix

Python script to simulate the display from "The Matrix" in terminal. Uses half-width katakana unicode characters by default, but can use custom character sets. Accepts keyboard controls while running. Based on CMatrix.
GNU General Public License v3.0
1.75k stars 161 forks source link

Add --ignore-keyboard option #41

Closed gebbber closed 1 year ago

gebbber commented 1 year ago

When using -w in .bashrc file as suggested by help text for --single-wave, keyboard input is captured, preventing the user from starting to type a terminal command. This allows the visual effect to run on opening the terminal, but quickly becomes impractical for everyday use as the user needs to wait for it to complete before typing a command.

This new command line option -i or --ignore-keyboard allows the user to specify that keyboard input is ignored. Any keypresses while the script is running will be passed back to the terminal on exit.

It can only be used with the --single-save or --time options—otherwise it exits with an error message. (This check may be unnecessary, as the SIGINT capture in the main loop is not ignored.)

gebbber commented 1 year ago

Weird changes in README.md due to automatic code formatting, will resubmit.