Honestly I’m surprised this wasn’t already a feature in macOS. Thank you for coding it and publishing as open-source!