The Python Script That Saves Me 10 Minutes Every Morning

How one tiny automation changed my morning routine, improved my focus, and made me fall in love with scripting all over again.

The Python Script That Saves Me 10 Minutes Every Morning
Photo by David Mao on Unsplash

One Python script. Ten extra minutes. Every single morning.

The Python Script That Saves Me 10 Minutes Every Morning

The Power of a Simple Script

There’s a moment every morning — just after I make my coffee — when my laptop opens, the tabs fire up, and I prepare to dive into deep work. But before that happens, I used to waste 10–15 minutes doing the same soul-sucking tasks:

  • Opening the same websites
  • Launching the same apps
  • Checking the same status files and emails
  • Setting up the same workspace layout

It was a drag. Not hard. Just… boring and repetitive.

Then I automated it.

A single Python script now handles everything. I run it while sipping my coffee, and by the time I’m done, my digital workspace is ready to go.

Here’s exactly what it does — and how you can build one to save your mornings too.

Why Morning Routines Matter (Even for Developers)

If you think 10 minutes doesn’t matter, think again. Ten minutes a day is over 60 hours a year.

But it’s not just about time — it’s about mental energy. Every manual action you perform early in the day is a tiny decision, a small drain on your cognitive budget.

By automating your morning routine, you:

  • Conserve focus for meaningful work
  • Reduce friction getting started
  • Build momentum faster

And for coders, there’s a certain joy in watching a script do the boring stuff for you.

What My Script Automates (The Routine Breakdown)

Here’s what my Python script currently handles:

Opens Daily Apps and Tools

  • VS Code
  • Slack
  • Notion
  • My Terminal with a specific virtual environment

Launches Commonly Used Websites

  • Jira (with a specific board)
  • My team’s documentation portal
  • Google Calendar
  • Gmail

Loads Today’s Focus Note

  • Automatically opens a Markdown file titled with today’s date
  • If it doesn’t exist, it creates one with a template

Checks Internet & VPN

  • Pings key domains to verify internet connection
  • Triggers VPN connection if working remotely

Sets the Mood

  • Plays a predefined “deep focus” playlist on Spotify
  • Sets the system volume to 30%

Let me show you how it works.


Building the Script (A Step-by-Step Guide)

Let’s break the core down into components. You can customize each part to suit your own workflow.

1. Opening Apps

import subprocess 
import platform 
 
def open_app(app_name): 
    if platform.system() == "Darwin":  # macOS 
        subprocess.call(["open", "-a", app_name]) 
    elif platform.system() == "Windows": 
        subprocess.call(["start", "", app_name], shell=True) 
 
open_app("Visual Studio Code") 
open_app("Slack") 
open_app("Notion")

2. Launching Websites

import webbrowser 
 
urls = [ 
    "https://calendar.google.com/", 
    "https://mail.google.com/", 
    "https://jira.mycompany.com/board/123", 
    "https://notion.so/myworkspace", 
] 
 
for url in urls: 
    webbrowser.open_new_tab(url)

3. Creating or Opening Today’s Note

from datetime import datetime 
from pathlib import Path 
 
today = datetime.today().strftime('%Y-%m-%d') 
notes_dir = Path.home() / "Documents" / "DailyNotes" 
notes_dir.mkdir(parents=True, exist_ok=True) 
note_file = notes_dir / f"{today}.md" 
 
if not note_file.exists(): 
    note_file.write_text(f"# {today} — Focus Notes\n\n- [ ] Top Priority\n- [ ] Secondary Tasks\n") 
 
subprocess.call(["open", note_file])  # macOS; use "start" on Windows

4. Connectivity Check

import os 
 
def ping(domain): 
    response = os.system(f"ping -c 1 {domain} > /dev/null 2>&1") 
    return response == 0 
 
if not ping("google.com"): 
    print("No internet. Reconnecting...") 
    subprocess.call(["open", "/Applications/VPNApp.app"])  # Replace with your VPN launcher

5. Setting Up Spotify

I use Spotipy (a Python client for the Spotify Web API).

pip install spotipy

Then in Python:

import spotipy 
from spotipy.oauth2 import SpotifyOAuth 
 
sp = spotipy.Spotify(auth_manager=SpotifyOAuth( 
    client_id="YOUR_CLIENT_ID", 
    client_secret="YOUR_CLIENT_SECRET", 
    redirect_uri="http://localhost:8888/callback", 
    scope="user-modify-playback-state,user-read-playback-state" 
)) 
 
playlist_uri = "spotify:playlist:YOUR_PLAYLIST_ID" 
sp.start_playback(context_uri=playlist_uri)

Why Python?

You could use shell scripts or Apple Shortcuts, sure. But Python is:

  • Cross-platform
  • Easier to read and customize
  • Flexible (you can easily extend it with APIs, file ops, etc.)
  • Fun — and that matters

It becomes more than just automation. It’s a daily reminder of what code can do — even in the small moments.

Customizations You Could Add

Depending on your needs, you could easily extend your script to:

  • Take a screenshot of your daily calendar and save it as wallpaper
  • Push a motivational quote to your terminal
  • Turn off Slack notifications during deep work blocks
  • Start a Pomodoro timer automatically
  • Pull your GitHub issues for the day and print them to the console

It’s your digital assistant — shape it your way.


Final Thoughts: Small Scripts, Big Wins

This script doesn’t write code for me. It doesn’t manage my life. But it creates space — mental space — for me to focus on the stuff that matters.

If you find yourself repeating digital chores every morning, I can’t recommend this highly enough: automate it once, win daily.

You’ll be amazed how much lighter your day starts to feel.


Want the full source code or a downloadable version? Let me know in the comments — I’ll share a GitHub repo if there’s interest.

Photo by Syuhei Inoue on Unsplash