one thing I've been appreciating more and more is the act of making things as frictionless as possible. when I do my daily deep work sessions, I like to block out all distractions, which includes mail, messages, and even checking stock prices. rather than setting a schedule which is sometimes too rigid, or having to setup a block every time, I made a little program that makes it a little easier.
here’s how it works: I just type deepwork in terminal
it asks me three questions, I type in the number of hours, whether or not I want to block certain things, and it will count down
then, it will show an ascii art and countdown until the block is unlocked.
after which my blocks are unlocked! so if you want to do this, here’s how:
requirements
- cold turkey pro
- just download and run
- arttime
- you can run
brew install arttime
in terminal if you have brew - if you don’t have brew, ask chatgpt how to install it
- you can also add in any custom ascii art later which is cool
- terminal (on mac)
steps
- install the apps above
- open terminal and type
nano ~/.zshrc
- open cold turkey and setup different blocklists, you can name them whatever you like, and set them to continous
- paste this in (change the names to match the names that you set up in cold turkey). for me I have 3 blocks for
finance
,google, amazon, stocks
, andmessaging
- if you have issues, ask chatgpt to change it for you
- you can also customize the ascii art you want on the last line there
deepwork() {
read "hours? > how long? (in hours): "
read "google_amazon? > block google/amazon? (y/n): "
read "stocks? > block stocks? (y/n): "
read "messages? > block messages? (y/n): "
minutes=$((hours * 60))
blocker="/Applications/Cold Turkey Blocker.app/Contents/MacOS/Cold Turkey Blocker"
to_block=()
[[ "$stocks" == "y" ]] && to_block+=("finance")
[[ "$google_amazon" == "y" ]] && to_block+=("google, amazon")
[[ "$messages" == "y" ]] && to_block+=("silence")
echo ""
echo "blocking ${to_block[*]} for $hours hours."
echo "press any key to cancel..."
for i in {10..1}; do
echo -n "$i... "
read -t 1 -n 1 key && { echo "cancelled."; return; }
done
echo ""
[[ "$stocks" == "y" ]] && "$blocker" -start "finance" -lock "$minutes"
[[ "$google_amazon" == "y" ]] && "$blocker" -start "google, amazon" -lock "$minutes"
[[ "$messages" == "y" ]] && "$blocker" -start "silence" -lock "$minutes"
~/.local/bin/arttime --nolearn -a butterfly -t "deep work time – blocking distractions" -g "${hours}h"
}
- hit ctrl x, then y, then enter to exit
- type
source ~/.zshrc
which updates it - now just open terminal and type deepwork and it’ll activate the blocks and show the timer automatically!
upgrade ideas
- also play the same sound track when starting