Text Expanders: aText for Mac
Tuesday, August 16, 2016

Despite having a pretty fast typing speed (~120 wpm), I'm always looking for ways to improve the speed of how to get the ideas from my head onto the screen as fast and efficient as possible.
text expanders are awesome

Enter text expanders. It allows me to use self-defined keywords to expand whatever text I choose. A simple example would be

brb : be right back

The moment I type those letters, it will auto expand out into it's full glory. Of course you can use triggers like [tab] to prevent expansion when you don't intend it to, but for my own use I find that instant expansion fits my needs; YMMV.

The app I use for my MacOS is called aText.
I can add any thing I wish and it'll just expand out, the common uses are for things like your email, names and such. I haven't been making full use of it yet as I only started dabbling with it near the end of my school term, but with it starting soon I'm sure I'll add many new snippets to it.

Following the trend of the previous productivity post, I created a GIF to show how it works.


As you can see I can quickly generate blank templates for whatever language I'm currently coding in. I've used it for awhile and it saved me a lot of keystrokes. It also allows me to quick insert time and date in whatever format I prefer, saves me the effort of checking and typing when needed.

There are quite a few competing software for MacOS but I think aText has the best value for the function it delivers without being too complicated. As for Windows, I've only used Phrase Express and it works same way. However I find that it feels a bit clunkier, not slow per say but it doesn't feel as instant.

Which is experience I get when switching between a Mac and my Windows desktop machine, when I want to modify a behaviour that ties in deeply with the system, MacOS always does it better (probably due to it's unix nature).

Oh as a bonus there's this emoji expander you can use natively with your MacOS without extra software. It allows you to do Slack type of emoticon usage.
https://github.com/warpling/Macmoji
I have it and it's pretty cool! (even though I almost never use it)
But for those people who can't live without emoticons 😢 😕 😄 , this is a really simple way to use them without spending too much time. Here's a GIF from the author that shows how it works.


Hope this helps in your productivity! The next post is probably a thought post WOT style. Stay tuned.

Labels: , ,


Alfred 2 Add To Temp workflow
Monday, August 15, 2016

As someone who surfs the net every single day, there will be times where I find something interesting and want to note it down. It usually comes in the form of a link. There are many apps out there that allows you to jot down random notes really quickly, but it still requires some mouse clicks or quite a few key strokes.

Simple note taking shortcut.
With the help of Alfred* as a digital assistant, I can create small scripts that reduce the amount of actions required. I'm using the paid (powerpack) version in case you're curious.
*only for MacOS

The scripts are called "workflows" in Alfred, it's a relatively simple IFTTT (if this then that) kind of idea.
It follows the pattern of [keyword/trigger] > [action] > [result/output]

As you can see, it's really simple, and it's relatively easy to make your custom workflows too as long as you know a bit of bash, or python, etc.

"att" is just a keyword that I chose (add to temp) for appending any of my note to this temporary file; while "temp" is a keyword for opening/viewing the saved snippets. Words aren't as effective as a simple gif, so here.

Native notification to show appended text!

As you can see, it allows your snippet to be of any length, even multiline paragraphs works as expected. It is also tagged with Date/Time to make searching a little bit easier. On the topic of searching, I may add that feature to this workflow so that I can search through the notes from Alfred itself, though I'm pretty sure that the "find" function in Sublime Text will beat any kind of search algorithm I can come up with.

With this, I can add any note within 4 actions.
Copy text, open prompt, att, paste
Since I don't have a place to host the .workflow file, let me just share with you the secret sauce that makes all of this works. It's just a 1 line bash command. Formatting the date, time, then passing in the {argument} that Alfred receives then appending it all into a text file. That's it!

printf "$(date +%d-%m-%y) | $(date +%r)\n{query}\n\n" >> ~/Documents/scripts/temp.txt

Well, hope you guys like this little cheat that I've shared. I still haven't test it out in school yet but it has proven rather effective in normal use. Next post shall be on the text expander that I use to reduce the amount of repetitive typing I have to do, stay tuned!

Labels: , ,