Skip to main content
  1. Stories/

My Automations with Apple Shortcuts

·9 mins
Analysis Automation Software iOS iPhone Linux Operating Systems Artificial Intelligence Blogging Computers Documentation Retrospective Management Optimisation Personal Programming Web Dev Workplace Workshop Long-Read Incomplete
Table of Contents

This year, I found Apple Shortcuts as a great tool to simplify some of my tasks, through the means of automation.

iPhones and iPads
#

All of my automations on iPhone are made via Shortcuts app. Some of them utilise the ssh and my Linux server.

  • You can get Shorctuts from AppStore, but it should be pre-installed on a new iPhone. If you have this app installed, you can open it with this link: shortcuts://
  • To use ssh, you need to allow running scripts in Settings:
    • (as of iOS 18) SettingsAppsShortcutsAdvancedAllow Running Scripts
    • To copy your ssh key, you go to the Shortcut that utilises the key, and you press on that key in the field named SSH KeyCopy Public Key. It should be placed at .ssh/authorized_keys on the server, and it should have right as -rw------- (which is chmod 600).
      • Note, that each ssh key is different to each device. If you’re like me having multiple devices, and you using Shortcuts from them, you need to copy all of the keys to that .ssh/authorized_keys file once.

Automation
#

Automation is the things that are triggerred automatically, based on some conditions.

For a very long time, I was unable to invent even one thing I want to use, but this year I finally started finding things I’d like to automate.

When Wind Down starts
#

I run a Shortcut that I called ‘Night Turn Off.’

It triggers the following actions.

  • Turn Airplane Mode On So I won’t be bothered by an uninvited caller. I don’t utilise that feature when a caller can call me 3 times and reach me. No way, thank you very much. Since my phone number is in public databases.

    I’m running an officially registered business, so it’s required by law for my phone number to be present in a public government database. Since I registered an entity, yeah, uninvited spammers started calling me within hours. As a result, I mostly never answer calls from the unknown numbers. I’m running different entities since circa 2011, so I can say, I don’t use my phone as a phone since then. All of my contacts know that if they want to reach me, it’s via the internet, usually FaceTime.

  • Turn Bluetooth Off So in case I forgot to turn off my smartwatch, it won’t be triggered with random notifications.

    Non-Apple smartwatches ignore your iPhone settings for Do Not Disturb (neat, Apple! Bravo!), so they’ll deliver the notifications deep into the night, unless they have their own settings for that. I like reliable solutions, when I’m in control. So I turn my Bluetooth off regardless of any other settings.

  • Set Brightness to 0% Obviously, for the phone to not burn my eyes.
  • Set Media volume to 0% Obviously, for the phone to not be loud in case I accidentally open some video. Usually, I don’t watch anything at nights.
  • Turn orientation lock On That’s for me reading things from my iPhone, while lying in bed.
  • Turn colour filters On I prefer a red filter on top of Night Shift. It’s much better on my eyes, and I can recommend anyone to try it out.
    • To set the filter, you need to go SettingsAccessibilityDisplay & Text SizeColour Filters → you need to turn it on to set it → Colour Tint → you may want to set Intensity and Hue, I have them set to the max. Alternatively, you can use any other filter, e.g. Greyscale is popular too.
    • I only read late at night, so I don’t mind it worsens the experience of watching videos or images.
    • I have a button in my quick settings (swipe down from the top right corner), which allows me to turn that off and back on, if I’d ever need it.
  • Turn off Wi-Fi on my old iPhone only.

    Before the war started, I would turn off Wi-Fi on my primary iPhone too. But these days it can be of a mortal danger, so I have no choice here. When there’s an Air Raid Alert, I can hear the siren (it’s very loud, yet if the windows are sealed, it’s not too audible).

That was my very first automation via Shortcuts.

When Waking Up
#

This previous automation needs a counterpart that runs in the mornings. It runs a shorcut named ‘Morning On.’ It turns everything back to normal.

At the beginning, I didn’t use ‘Run Shortcut’ trigger, but later, I realised it’s a better way of doing it, because it allows that shorcut to be shared. So if I want to help automate the same things for someone else, I can share the shortcut, and help tune the automatisation settings.

When I Approach Kindergarten
#

This automation runs 3 or 4 times a day, because I have two kids and two different schedules for each of them.

Both automations help me message the template message to our shared (with my wife) Matrix group, named ‘Kids.’ The message is simple ‘Kids are in Kdg.’ or ‘I’m getting [kids name] home.’

They run their respective shortcuts.

They’re similar in nature.

  • When I arrive at the location
  • at Time Range between 8 and 11 am
  • Run After Confirmation, that allows me to choose whether I actually need to run that Shortcut

So, the UX is like that: I approach the location in the morning, and I’m getting that notification. If I run it, the app triggers the shortcut:

  • Asks who is in the Kdg: 1st, 2nd, or both
  • Triggers scenarios for each case
  • So I just paste the message to the group.

I haven’t found a way of automatically pasting to the appropriate group in Element X, but the current development isn’t too complicated. It’s much easier than opening the chat app and writing (the very same all the time) message.

Which isn’t too difficult for me, considering, I’m a very quick typer even from my iPhone (I use swipe keyboards since the early days of Android, and then iOS too).

But the primary idea is that it triggers other actions based on that, and it’s very handy. If I’ll ever want to add anything else to this (e.g. when I’ll be getting kids from school and there are more things to do), the approach would scale easily. I love when systems work even when they’re scaled very much.

When battery level falls below 35%
#

  • Turn Low Power Mode On
  • Show notification ‘Battery’s at 35%.’ The point is, I receive that notification on my wrist, and it’s super handy.
  • If Time in between 07:55 and 20:55
    • → Speak ‘Battery Discharged at 35%’
  • End If

When battery level rises above 65%
#

  • Turn Low Power Mode Off
  • Show notification ‘Battery’s at 65%.’ I receive that notification on my wrist, and it’s super handy to control the charge of my phone that way, not overcharging it. Most times, I charge my phone 35% → 65%, because it holds most of the day for me.

    I’ve learned to not doom scroll my phone for too long.

  • If Time in between 07:55 and 20:55
    • → Speak ‘Battery is at 35%’
  • End If

iPads Exclusive
#

I have many iPads at home. I use all three sizes: mini, regular and Pro 12.9.

  • They have no location-related automations my iPhones have, as they live at home, and usually I’m lazy to take any iPad with me, even the mini one, I just don’t need them and my iPhone is usually plenty.
  • However, they have one unique automation, that is not present with my iPhones.

The unuqie automation triggers the turning off shortcut I use for the night time (with the exception of having no red colour filter). It’s triggered multiple times a day, and is very useful, because I put off my iPad and can not using it for days. So when I take my iPad back, its battery level is (almost) the same as it was when I left it. With wireless turned off, my iPad can spend weeks just lying in its bed.

Or months, I just use it at least monthly.

Shortcuts
#

These shorcuts are not automated and are invoked with a press of button. Usually, I use them as widgets, either on the widgets page (swipe right from the homescreen), or from quick panel page (swipe down from top right).

Logging
#

I log many things for many years. Notable things are:

  • Water intake

    That is not longer relevant, as I have no issues with consuming enough water. Although, it was a nice idea to log that information.

  • Nutrition

    It’s my favourite one, I use it daily. I log what I eat, and I can check what and when I’ve been eating, so I can control my hunger better. (I’m becoming super hungry within 3 to 4 hours.)

    The script logs the information into the daily files, and when the info retrieved, it shows only the today’s part. I don’t need to know and remember what I’ve been eating yesterday, that takes unnecessary information out of my way.

  • How often I do haircuts

    I noticed that it’s exactly 34 days for me. On the 35th day it looks much worse, and each day it progresses geometrically! 😱

All those are just scripts that I invoke via ssh. They trigger the respective actions on the server. They have their counterparts to read that information. Most of the logging scripts I use are abandoned by now, I still keep the nutrition one.

I’m okay with all of them being abandoned, their function is for me to track some things and understand myself better. Most times, some life logging experience is very useful when done shortly, there’s no much sense in tracking my haircuts now, but it was quite useful to understand how long it takes for me to become a bear these days.

Blogging
#

I have 3 shortcuts that can create new entries for my websites.

  • new private note
  • new blog post with the menu of which blog, so it’s one shortcut for all of my projects
  • new links post, it works through the provided link to simplify me the creation, so it’s a separate shortcut, as it also asks for extra info. I can share any link with it, and it’ll be grateful
Reply by Email

Related

How I Optimise Images
·10 mins
Documentation Long-Read Linux Programming Scripts Software Optimisation Perfectionism Design Illustrations
Computers and Me
·2 mins
Operating Systems Personal Essays Hardware Computers Workplace Incomplete
Siri, a Great Disappointment
·3 mins
Artificial Intelligence Software iOS Essays Services Incomplete
Colophon: How This Website is Made
·5 mins
Documentation Long-Read Website Web Dev Colophon
How I Write
·5 mins
Personal Software Hardware Essays Typing Machine Workflow Automation
How I Use Linux as My Desktop OS
·9 mins
Personal Software Essays Linux Operating Systems