Easily Allowing and Forbidding Distractions on OS X macOS

Facebook and Instagram are better than television and like any good thing it is nice to have a break. Real televisions have an on/off switch but computers don’t really. Technical folks: here is one way to make it easy to give your OS X macOS box an on/off switch for your social sites:

#!/usr/bin/env bash
# -*- mode: sh; -*-

if [ $# -eq 0 ]; then
    sudo cp /etc/hosts.distractions /etc/hosts
    printf "...forbidding distractions.\n"
else
    sudo cp /etc/hosts.org /etc/hosts
    printf "...allowing distractions.\n"
fi

Leave a Reply

Your email address will not be published. Required fields are marked *