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.7k stars 158 forks source link

Added --ignore-keyboard #42

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 produces 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 starting to type 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 available to the terminal on exit.

Previous pull request required that --single-save or --time options be used concurrently, but this was unnecessary, as the main loop still allows SIGINT capture.

will8211 commented 1 year ago

Hi @gebbber.

Thanks for this improvement! I'll have a look this week and test it out cross-platform.

gebbber commented 1 year ago

Sounds good. I left an artifact in the --help docs from my previous version. I've just updated, as I had already removed the requirement to use it with -t or -w. (might be worth checking that Ctrl-C works cross-platform)