Cartoon of Author
via Mastodon

@zackeryfretty

Paste in Uppercase/Lowercase using Alfred App Workflows on macOS

🗓

When working with designers / copywriters one thing I frequently run into is the use of uppercase lettering -- especially in designs. While it can make sense at times, visually, I try not to write in all caps directly as I know it can be a problem for some screen readers. Though, tbh, it looks like these days using text-transform isn't all that better.

Still, I keep up the habit as I like to try and keep the content/markup I enter uniform. I figure, maybe one day those all caps headers won't be trendy anymore and you need to switch everything back to title case, who knows? Just seems like a good idea for the future.

Originally I was running everything through sites like CaseConvert or using a text editor to make the change but over time that got to be pretty annoying, so I came up with the idea to assign pasting in uppercase and lowercase to hotkeys on macOS. I use the CMD+SHIFT+V to paste in plain text alllllll the time so it made sense to me to assign this action to:

To do this I ended up using Alfred App -- which I already use for a plethora of other productivity tricks -- using the "Workflows" feature.

I expected this to be harder than it was, but it turns out setting this up is super straight forward and only requires a few steps.

The first thing you'll want to do is open up workflows in Alfred and create a "Blank Workflow":

From there you can right click anywhere in the workflow canvas and set a hotkey as a trigger:

Configure the trigger as follows (you can replace CMD+SHIFT+L with whatever you want, but you'll want it set as a pass through so the process feels seamless.):

Next, right click again in the workflow canvas and add an output of "Copy to Clipboard":

From there simply add {clipboard:lowercase} as the content and configure the rest of the options as shown:

Lastly, you just need to connect the two items together in the canvas, like so:

Then...that's it! You should now be able to use CMD+SHIFT+L to paste any text in your clipboard as lowercase. You can also repeat the process using {clipboard:uppercase} instead to paste in all caps.

Both of these triggers can be defined in the same workflow.

I'm aware I could simply share this workflow using the export tool, but what fun is that? There's no custom code or anything tricky here so it's the perfect opportunity to get some experience working with the workflow editor if you've never used it before. Give it a try! You'll do great! 😄

———