FYI - this plugin has the same feature and doesn't require external program
https://hub.virtamate.com/resources/macgruber-essentials.160/
Unless I missed something? I'm only pointing this out as I too created a plugin to do this until I realised it had already been done