<commit_before>Terminal Think Music
====================

Are you executing a process that takes a long time?  Do you want to know that it’s
still working while you are in another terminal/making coffee?  Do you have a
favorite game show tune to play while doing something?

If yes: ``think`` is just for you.

Configuration
-------------

Create a file named ``~/.config/think.conf`` (or wherever your ``XDG_CONFIG_HOME`` is) with the following four lines::

    [Think]
    command = play
    file = /home/kwpolska/Dropbox/Media/Wielka Gra.mp3
    behavior = wait

* ``command`` is the command of the player that will be executed.  You can use
  ``play`` (from ``sox``) or any other fast CLI music player.
* ``file`` is the filename that will be given as the sole argument to the play command. No escaping is necessary. I’m using the `Wielka Gra <https://www.youtube.com/watch?v=Nnu7I3b7ZbY>`__ theme, Americans might want `Jeopardy! Think Music <https://www.youtube.com/watch?v=vXGhvoekY44>`__ (also the namesake for this command), Brits might want the `Countdown theme <https://www.youtube.com/watch?v=M2dhD9zR6hk>`__.
* ``behavior`` can be one of:

  * ``return`` — return control to the terminal as soon as the program finishes, without stopping the music
  * ``wait`` — wait until music stops before returning control
  * ``stop`` — stop the music and return control immediately

Usage
-----

Prepend ``think`` before the command that takes long::

    think sleep 120<commit_msg>add install instructions to README<commit_after>Terminal Think Music
====================

Are you executing a process that takes a long time?  Do you want to know that it’s
still working while you are in another terminal/making coffee?  Do you have a
favorite game show tune to play while doing something?

If yes: ``think`` is just for you.

Installation
------------

You can install ``think`` from PyPI (with ``pip install think``). Arch Linux
users can install the ``think`` package from the AUR.

Configuration
-------------

Create a file named ``~/.config/think.conf`` (or wherever your ``XDG_CONFIG_HOME`` is) with the following four lines::

    [Think]
    command = play
    file = /home/kwpolska/Dropbox/Media/Wielka Gra.mp3
    behavior = wait

* ``command`` is the command of the player that will be executed.  You can use
  ``play`` (from ``sox``) or any other fast CLI music player.
* ``file`` is the filename that will be given as the sole argument to the play command. No escaping is necessary. I’m using the `Wielka Gra <https://www.youtube.com/watch?v=Nnu7I3b7ZbY>`__ theme, Americans might want `Jeopardy! Think Music <https://www.youtube.com/watch?v=vXGhvoekY44>`__ (also the namesake for this command), Brits might want the `Countdown theme <https://www.youtube.com/watch?v=M2dhD9zR6hk>`__.
* ``behavior`` can be one of:

  * ``return`` — return control to the terminal as soon as the program finishes, without stopping the music
  * ``wait`` — wait until music stops before returning control
  * ``stop`` — stop the music and return control immediately

Usage
-----

Prepend ``think`` before the command that takes too long to execute::

    think sleep 120
{'fraction_non_alphanumeric': 0.12117387188387505, 'fraction_numerical': 0.00757336699274219, 'mean_word_length': 3.9300155520995332, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3648391', 'n_tokens_mistral': 937, 'n_tokens_neox': 893, 'n_words': 420}