Skip to main content

Get work done when you need to, goof off when you don't.

Project description

Concentration

PyPI version Test Status Lint Status codecov Join the chat at https://gitter.im/timothycrosley/concentration License Downloads Code style: black Imports: isort


Read Latest Documentation - Browse GitHub Code Repository

Stay focused on work when you want, and goof off when you don't. Concentration is a simple Python 3 console utility to block distracting sites when you need to focus, while allowing you to easily take timed breaks. Concentration uses the /etc/hosts file as the mechanism to block sites, and works on Linux, Macintosh, and Windows.

Concentration Example

Installing Concentration

pip3 install concentration

# Or if pip is already set to use Python 3
pip install concentration

Using Concentration

To keep focused (blocking distracting sites):

sudo concentration improve

To take a small 5 minute timed break:

sudo concentration break

To take a long 60 minute timed break:

sudo concentration break -m 60

You can cancel breaks with Ctrl-C.

To disable blocking until you explicitly enable it again:

sudo concentration lose

Configuring Concentration

You can add more files to the blocked list by putting them in the following files (new line delimited):

  • ~/.concentration.distractors
  • /etc/concentration.distractors

You can make sure sites are visible even if concentration is enabled by putting them in the following files (new line delimited):

  • ~/.concentration.safe
  • /etc/concentration.safe

Thanks and I hope you find concentration useful in your effort to get more done!

~Timothy Crosley

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

concentration-1.1.2.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

concentration-1.1.2-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file concentration-1.1.2.tar.gz.

File metadata

  • Download URL: concentration-1.1.2.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.6 Linux/5.8.0-7642-generic

File hashes

Hashes for concentration-1.1.2.tar.gz
Algorithm Hash digest
SHA256 181c551c0f81f7b1e387b06afb360bd4cf378ca1c1729661d21d55a2804a3b0f
MD5 2d308e12400b05669b94013470c25fd5
BLAKE2b-256 5e7c3fec952cc9f80d5eb60e0df2389f2fc071911526b28fcfb1bbbbb0a4f525

See more details on using hashes here.

File details

Details for the file concentration-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: concentration-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.6 Linux/5.8.0-7642-generic

File hashes

Hashes for concentration-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 489bf5604ed736043d2e154bf09b590af693ff4119403b768b0064ba3b3961fc
MD5 083317223cc81490a1326db519d8971c
BLAKE2b-256 5c10d7ba51a2989fa3d7aaa92b8fc961b89713704e56045dfb2c73cf510a1cb0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page