Utkarsh Shigihalli
Published in

Utkarsh Shigihalli

Transform text using Alfred’s Universal Actions

Alfred’s Universal actions allow you to trigger actions using system wide hotkey and in this quick post we will see how we can utilise it to transform text

I use Windows laptop for my work and heavy Mac user for my personal dev work. One of the first Mac utilities I purchased after purchasing Mac was Alfred launcher.

I am heavy Alfred user and Alfred even tells me my usage with a chart. I regularly check my usage and see options to improve my usage by writing custom workflows for my needs.

One of the regular things I end up doing is text transformations — converting text cases, selecting text from webpages or pdf files and searching the web (Google, GitHub etc).

Most browsers (Vivaldi, Brave or Chrome) allow you to right click on a selected and do a quick search. However, if you would like to search other pages, it will get tricky. There are tools for Mac, which let you define custom actions on selected text.

Custom Universal Actions to transform text

Go to Alfred Preferences and Workflows Tab and create a workflow. In the designer, right click and under Triggers you will see Universal Action .

Clicking that you will be presented it with below dialogue. Give it a name and I am ensuring this is available only for text selections. If you prefer, drop an icon in the placeholder as well. Click Save

Next, right click again and under Utilities , you will see Transform action.

You can also find tasks to run custom scripts under Actions

Clicking Transform, you will get presented with a dialog allowing you process the input and perform an action. For this example, I would like to transform the selected text to upper case, so I will select Upper Case action.

Finally, we need to output the transformed text somewhere right? In our case we need it in our clipboard so that we can paste it where we need the text. So, we right click again and select Outputs and then Copy to Clipboard .

You will be presented with another dialog allowing you to keep the formatting or use it as plain text. I also decided to automatically paste the text to front most app.

Only thing remaining now is, connecting Input, Processor and the Output, which you can just by dragging the individual connector.

I have created few more (lower case and title case) transformations and my workflow looks like this.

Triggering our Universal Actions

Trigger the Universal Action by pressing your defined hotkey, in my case it is ⌥ + ⌘ + U

Press the hotkey, find the action and you will get the text transformed.

That is it, a quick post on using Alfred’s Universal action.

Recommended from Medium

SVG problem in iOS

Trace Network Labs

CS 373 Spring 2021 Week 4: Kevin Chen

Warning: The Dataset Is under Maintenance

ASP.NET Core updates in .NET 5 Preview 5

Programming Question: Knuth-Morris-Pratt Algorithm for String Search

The Totally Beginners Guide to Magento 2 REST API

Creating your own micro front-end framework for React

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Utkarsh Shigihalli

Utkarsh Shigihalli

Microsoft MVP | Developer | Passionate about Cloud, .NET and DevOps

More from Medium

Logseq Mobile App (Android) and Sync with Google Drive. Logseq IOS App Coming Soon.

Installing Homebrew on Mac M1

How to install macOS before 10.7 under VMware or Parallels

Best Ways To Uninstall Apps On Mac (2022 Guide)