A while back, I made a feature request to Peter, the developer of Keyboard Maestro. I wanted to display the results of macros in my Mac’s menu bar. He took it to heart, and implemented it in the next upgrade of the utility.
I have used the new feature to display various things in my Mac’s menu bar.
Some examples:
The currently playing tune in Music:
The next reminder in Reminders, with a minute countdown:
And, of particular interest to TaskPaper users, the first task tagged with @today in my main TaskPaper document:
The idea is to keep one task always visible in your Mac’s menu bar—this helps me to stay focused on that task while I work.
If I ever get distracted, I just look at the menu bar to regain my focus.
The macro works by periodically running a cat command, then saves the result to a Keyboard Maestro variable (varToday):
cat /Users/jim/Library/Mobile\ Documents/iCloud\~is\~workflow\~my\~workflows/Documents/Focus.txt | grep -v @done | grep -m 1 @today
The cat command searches the TaskPaper document (another cheer for plain text, and the ability to run system commands on such!), and returns a list of items with @today in them. Grep removes @done items and all but the first item.
A macro group reads the variable, and displays it in the Mac menu bar. I can toggle the display of the item in the menu bar using ⌃⌥⇧⌘F1:
This .zip file contains the macro. You will need to unzip it and import it into an already installed Keyboard Maestro on your system.
Ω—Reminder Display—TaskPaper @today (varToday).kmmacros.zip (1.2 KB)
You will need to adjust the path in the cat command to the path of your main TaskPaper document.
You will have to make a macro group like this:
I have it set to run every 15 seconds from 9am to 7pm. You can adjust this to suit your desired hours/refresh rate.
You will need Keyboard Maestro to use the above. In my personal experience, it is the most useful utility I own—it is worth every penny.
I hope the above is helpful. Let me know if questions arise.
Enjoy!