Alfred is a wonderful app and file launcher that saves me tons of time every day and has successfully replaced not only Spotlight but also the clipboard.
After upgrading to version “two” in Alfred, it became possible to create your own firmware (workflows). This thing is an order of magnitude more useful than it might seem at first glance, and now I will tell you why.
To work with forkflow, you need the Alfred Power Pack.
How workflows work at Alfred
You don’t need to understand programming to use macros. On the official forum there is a special thread where Alfred users post their own workflows for free use. Installation is elementary – double click and you’re done.
A list of all installed macros can be found in the settings. They look like flowcharts, where for each element you can set AppleScript, bash code, and all sorts of useful things. If the downloaded script does not work the way you want it, then you can always make the necessary edits to it.
Of course, having received such a great tool, I wanted to write something for myself. And since I hate manipulating photos, my choice fell on the tedious extraction of icons from macOS applications. Well, you know, the ones that end up on the home page of the site.
By the way, icon extraction has already been partially simplified. I used an OS X service that allows you to export them to the Desktop in a couple of clicks without having to dig into the program’s resources. But for this, you still need to perform monotonous actions: find the program itself in the Finder (using the same Alfred), right-click, select the desired service, close the Finder … Agree – it’s still long and uninteresting.
So why not teach Alfred how to extract icons from applications at the stage of searching? For example, by specifying a keyword in front of the program name, say, icon?
After wandering around Alfred’s forum a bit and looking at examples of other macros, my workflow Icon Extractor for OS X Apps was born. It uses slightly tweaked bash code from Brett Terpsa.
By default, workflow will export the icon in PNG format and 512px resolution. If you want JPG or another size – just change these parameters in the script itself. If you want to always pull out icons at maximum resolution, then simply remove the line —resampleHeightWidthMax 512 from the script.
Examples of other workflows
In conclusion, I would like to share other interesting workflows that I use myself. All of them are completely free and available for download through the official website.
- Show / Hide Desktop Icons – by executing the command in Alfred deskicons all icons on your desktop will magically disappear. Repeated execution will put them back in place. Squeak can easily replace paid counterparts like Camouflage and will be useful for those who record screencasts.
- Caffeinate – you know exactly about the Caffeine utility. This is the same coffee cup in the top menu that keeps your computer awake.
- Battery – dial bat and see your battery usage statistics.
- Top Processes – as Winnie the Pooh used to say – “This is” F-z-z “- not without reason!” If the fan of the computer makes noise for no reason, then some application has pulled on all the resources. In such cases, we usually climb into System monitoring and catch the culprit.
Top Processes speeds up this task at times. It is enough to dial top to see processes sorted by CPU usage. Click on the desired process with the mouse while holding down the Cmd key and the culprit will be forcibly closed. Simple replacement for iStat Menus.
- BT & Wifi Toggle – Commands wifi and bt turn on or off the corresponding wireless interfaces and additionally save you a couple of seconds.
- OmniFocus Tasks – Sends the current tab from Safari / Chrome / Firefox to OmniFocus.
- Disk Space – displays the amount of free space on all connected drives.
Alfred and his macros are great helpers. When used correctly, you will not only be able to do routine tasks faster, but also get rid of unnecessary programs. In my case I ditched Camouflage, Caffeine and iStat Pro widget. And as you probably know, less software means less worries.
Try Alfred Power Pack.