From Stress to Serenity: How the "Wind Down" Script Prepares You for Bedtime

Relaxing before bed is crucial. This script helps you unwind by dimming your screen, turning off notifications, and more.

From Stress to Serenity: How the "Wind Down" Script Prepares You for Bedtime
Use Jellycuts to Create Your Own "Wind Down" Script

The Inspiration Behind the "Wind Down" Script: Prioritizing Peace and Rest

Life’s busyness makes it hard to unwind, causing restless nights and stress. This cycle affects both mind and body. Recognizing this struggle, I wanted to create a solution that could help ease the transition from a busy day to a peaceful night. The goal was simple: to design a script that would automate the process of winding down, making it easier to relax and prepare for a good night's sleep.

Full Script

import Shortcuts
#Color: green, #Icon: shortcuts

# Display an alert to start the wind-down process
alert(alert: "You want to begin Wind Down?", title: "Wind Down Alert", cancel: true)

# Ask for input on how many minutes to wind down
askForInput(prompt: "In how many minutes?", type: Number, default: 5, allowDecimal: true, allowNegative: false) >> min

# Set the screen brightness to a low level
setBrightness(value: 0.1)

# Enable Do Not Disturb mode
setDND(state: true)

# Enable Low Power Mode
lowPowerMode(state: true)

# Calculate the total time in seconds
calculate(input: "${min} * 60") >> time

# Wait for the calculated time
wait(seconds: time.as(Number))

# Display an alert that the wind-down period has ended
alert(alert: "Wind Down has ended", title: "Wind Down Alert", cancel: false)

# Restore the screen brightness to a higher level
setBrightness(value: 0.8)

# Disable Do Not Disturb mode
setDND(state: false)

# Disable Low Power Mode
lowPowerMode(state: false)

Jellycuts Wind Down Script

How the "Wind Down" Script Works

1. Starting the Wind Down Process

# Display an alert to start the wind-down process
alert(alert: "You want to begin Wind Down?", title: "Wind Down Alert", cancel: true)

First, the script asks if you want to start "Wind Down" mode. This is your cue to start relaxing and get ready to unwind.

2. Choosing Your Relax Time

# Ask for input on how many minutes to wind down
askForInput(prompt: "In how many minutes?", type: Number, default: 5, allowDecimal: true, allowNegative: false) >> min

Next, it asks you how long you want to wind down. You just type in the number of minutes, and the script takes care of the rest.

3. Setting the Mood

# Set the screen brightness to a low level
setBrightness(value: 0.1)

To help you relax, the script lowers your screen brightness. This makes the screen easier on your eyes and helps you get into a chill mode.

4. Blocking Distractions

# Enable Do Not Disturb mode
setDND(state: true)

# Enable Low Power Mode
lowPowerMode(state: true)

It then turns on Do Not Disturb mode, so you won't be bothered by notifications. It also switches on Low Power Mode, which saves battery and keeps things simple.

5. Counting Down

# Calculate the total time in seconds
calculate(input: "${min} * 60") >> time

# Wait for the calculated time
wait(seconds: time.as(Number))

The script then waits for the amount of time you chose. This is your time to do something relaxing, like reading a book, meditating, or just chilling.

6. Bringing You Back

# Display an alert that the wind-down period has ended
alert(alert: "Wind Down has ended", title: "Wind Down Alert", cancel: false)

After your wind-down time is up, the script sends you another alert to let you know it's over. This helps you smoothly transition to whatever you want to do next, like getting ready for bed.

7. Returning to Normal

# Restore the screen brightness to a higher level
setBrightness(value: 0.8)

# Disable Do Not Disturb mode
setDND(state: false)

# Disable Low Power Mode
lowPowerMode(state: false)

Finally, the script resets everything: it brightens your screen, turns off Do Not Disturb, and ends Low Power Mode. Your phone goes back to normal, ready for whatever comes next.

Conclusion

Dimming the screen and blocking notifications creates a calm environment and sets a time to unwind, easing stress. For a relaxing end to your day, try the "Wind Down" script. It’s a simple way to prepare for a good night’s sleep.

Become a Jellycuts Member

Whether you're a developer or just want to streamline tasks, Jellycuts makes automating iOS workflows simple and powerful. A subscription gives you advanced features, exclusive scripts, and a community of creators. Transform your iPhone or iPad into a productivity tool. Subscribe now to simplify your life.
›› Subscribe Today ‹‹