This year, I used automations on my:
- iPhones;
- iPads;
- Linux servers and personal computers.
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)
Settings
→Apps
→Shortcuts
→Advanced
→Allow 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 Key
→Copy Public Key
. It should be placed at.ssh/authorized_keys
on the server, and it should have right as-rw-------
(which ischmod 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.
- 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
- (as of iOS 18)
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
Settings
→Accessibility
→Display & Text Size
→Colour Filters
→ you need to turn it on to set it →Colour Tint
→ you may want to setIntensity
andHue
, 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.
- To set the filter, you need to go
- 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
- Copies pre-defined text to the clipboard
- Set timer/s till the time I should leave before to get them back home
- Opens Element X (matrix.org client), more on that see the matrix tag.
- 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
Linux#
I use Linux on and off since 2007, and I use it daily on my laptops since 2019. I set a cluster of servers shortly before switching from macOS to Linux.
- If you’re interested in the topic, follow the tags: Linux or Operating Systems.
Servers#
I have a cluster of servers, and I run multiple Linux distributions. Generally, it’s just two:
- Debian or DietPi on ARM processors.
- Arch Linux on x86-64 processors.
However, they’re the same with the regard to scripting. I use bash.
I’m not trying to cover all the possible automations I do, and I’m trying to focus on this year only. Because, frankly, I could just forgot something I made a couple of years back, what is still working. E.g. I have a set of scripts that do incremental backups with rsync, they are triggered a couple of times a day.
Create Entry#
There is a counterpart script to an iPhone Shortcuts. (A set of scripts.) All of my entries into all of my blogs are created with the help of a script. For iPhone, I use a slightly modified version, but in general they all are mostly the same. I decided not to try creating one mega-script, but use a simpler design and go with just different scripts.
- An example of a such a script, I guess I’ll add it later right here. I want to think of the better way of publishing it.
Weather Log#
I log hourly weather info into daily files.
Sometimes it’s handy to understand what the weather was yesterday. Not a single weather app I’ve ever tried in my entire life represented its data as ‘yesterday was cold and today is a bit warmer.’ So I could actually made simple decisions of what to wear, and not deciphering a very complex set of data.
The script does nothing too complex. It utilises ansiweather and is logged on all of my devices (to collect the information regardless of blackouts). It collects all the info in plain text information for me, and I have a special script that parses is and removes all the duplicates. It’s pretty neat, I like it.
Desktops#
On Desktops, I use Arch Linux on my computers and laptops and Fedora Linux on shared computers. I’m happy about Fedora as a low-maintenance distro, and I have mostly nothing automated there.
Fedora#
I have only one script. There’s this computer that runs media for us, an HTPC. Sometimes I work from it, but mostly not. It’s just attached to a 32" 4K display.
I have a systemd timer that sets the display brightness to its lowest at 8 pm (probably, I want to set it less ambitiously to 9 pm), so it triggers ‘hey, it’s time to get started being prepared for sleep.’ It returns back to normal in the morning.
Arch#
Oh, on Arch, I have a gazillion scripts I’ve made this year. I don’t even know where to start and whether I should even try to describe them all. I think, I’d like to at least try covering most of them, or the most interesting ones. As I basically rewrite my OS (so to say) to fit my workflows. Since I do it on a weekly basis, there’s a lot to talk about.
I say weekly, not daily, as I’m keeping myself from improving things all the time, I have to do something with the computer too.
IRL#
Automation isn’t only about computer systems, but about repetitive tasks too.
They not necessarily must be automated Wallace-style mad scientist way. My vision is that these tasks are automated through some positive habits.
Sorting Rubbish#
Apart from regular sorting of our wastes, we collect plastic caps, batteries, and tin cans (for the AFU). For that, we have special containers located on the ground floors of each section of our apartment complex.
At home, we have a special (custom-made) vertical shelf with shoes in our dressing room. Bottom shelves are for kids shoes, so I’ve learned to put those caps or tin cans on the lowest levels, so Hnat (our kid of 3 yo) would notice.
No batteries though, they’re dangerous for kids. They seem to understand they cannot ever eat them, yet I’m still nervous about that, and so I keep them out of their reach anyway.
For me, that was always the problem to not forget these tiny little things, yet for him that’s some game he enjoys. He never forgets to get the waste outside of the house! So, now we have this tiny tradition. A few times a week we have at least something (most times that’s caps, of course), so we get it with us and put into the recycle bin.
A tiny thing, yet I found it worth having noted too. I guess there are many things we could make a game of, and enjoy doing them with the kids. Automation can be fun and interesting, before it becomes… well, automated, and not too noticeable.
Lamps#
I’ve bought a set of tiny led lamps on batteries, with motion sensors.
- They all have USB-C chargers, and they hold the battery up to a week or so.
- They have magnets, so I can easily hang them in different places.
- They form a nice way to the bathroom, so we have no need to turn on the bright light at nights.
- They have a stylish minimalistic circle form, so they’re much better than I expected them to be.
I bought them mostly for two scenarios, for blackouts and probably for kids to go to the toilet at nights. The latter I wasn’t sure about, since they do that not often. Yet it’s just more convenient to have them.
They turned out to be super-handy, and the number of situations we use them for, is just much more than I originally thought.
- E.g. when I come home late at night, and everyone is sleeping, they light the corridor enough for me to get undressed and enter the bathroom, where they are present as well.
- When one of the kids has fever, and we need to check temperature or give some meds, it also helps to light the room enough to not wake up everyone. They’re not too bright, and they’re of a yellow colour, so they’re much better than an iPhone’s flashlight lying around.
It works like magic, they turn off within 30 seconds or so. It’s plenty of time to do something, and it’s not too long till they turn off. Before them, I had my iPhone always ready as a flashlight, but it’s just so much less convenient. It’s nice to have that iPhone skill for out-of-home situations, but it’s much better to just have those lamps at home.
Charging them is less hassle than I expected.
- Since they’re USB-C lamps, and I have many USB-C chargers being here and there, I just take lamp to whatever charger is free right now, and that’s it.
- When I need it the next time, it’s usually charged already, so I take it back.
- I don’t need to check on the lamp ever, as if it discharged, it won’t spread light, easy. This gets more complicated when the blackout situation is too bad, yet it mostly good these days. And not everyone is at war with their barbaric neighbour these days. (Yet?)