trag1c / Babble

Babble is a pretty visual noise generator TUI application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Babble

Babble is a pretty visual noise generator TUI application.

Screenshot of the interface of Babble.

What is its purpose?

To be fair, none. It's more like a fun project and a proof of concept of combining coquille and outspin.

Usage

After starting Babble, you should see two text elements: at the top is the header of the application, and at the bottom the status bar with the keys and what they do when pressed.
A huge empty space is left in the center: this is where the window that you will fill up sits.

  • Press Space to randomly fill the pixels until the window is crowded.
  • Enter is similar to Space but is like a "step": it only randomly fills a few pixels and the process is done once.
  • Pressing r will shuffle the pixels around. It does not fill any new one.
  • Pressing s does the opposite of r: it sorts the pixels in a certain way.
  • Press e to clean the window.
  • i enters the immersive mode, which simply hides the header and the status bar. Pressing it again exits that mode.
  • Press f if you need to force refreshing the interface, for example if your terminal size has changed.
  • Finally, you can press q to quit Babble. Alternatively, you can also use esc.

Important

Space: You can interrupt the process by pressing Ctrl + C. The pixels already filled keep their state.

Note

The sorting algorithm will be configurable in the future.

How to run it?

Once you have installed Babble locally, simply type babble in the terminal and press Enter.

Installation

  1. First, clone the repository and move to the directory:

    git clone git@github.com:qexat/babble
    cd babble
  2. (Optional, but highly recommended) Create a virtual environment and activate it:

    virtualenv .venv -ppython311
    source .venv/bin/activate

    [!WARNING] If your shell is not bash, the activation script might have a slightly different name.

  3. Install Babble:

    # the dot means "the project of the current directory"
    pip install .
  4. You are set up! You can now run Babble:

    babble

Once you are in Babble, press q or esc to quit the program.

All the commands above at once:

git clone git@github.com:qexat/babble; cd babble
virtualenv .venv -ppython311; source .venv/bin/activate
pip install .
babble

Configuration

Some of Babble's behavior can be configured.

  • --randomize-at-launch: (default: False) pretends that you pressed Space at startup.
  • --immersive: (default: False) activates the immersive mode by default.
  • --pixels-per-step: (default: 1000) changes the number of pixels generated at each step (e.g. when pressing Enter)
  • --theme: (default babble) sets the context theme to be one of the built-in ones.

Themes

Here is a list of the built-in themes.

To set a theme, specify the --theme argument in the command line, for example:

babble --theme plasma

Babble (default)

A nice 2D gradient from red to blue through magenta.

Screenshot of the interface of Babble with the default theme.

Plasma

Every pixel is of completely random color.

Screenshot of the interface of Babble with the Plasma theme.

Radioactive

babble, but in a different orientation and with some green noise overlay.

Screenshot of the interface of Babble with the Radioactive theme.

Monochrome

A simple left-to-right black-to-white gradient.

Screenshot of the interface of Babble with the Monochrome theme.


I hope you like it ❤️

Encountered a problem? Want to request a feature? Open an issue!
A question? Find me on X/Twitter!

About

Babble is a pretty visual noise generator TUI application.

License:MIT License


Languages

Language:Python 100.0%