Yesterday, I noticed that the Stocks Dashboard widget in Mojave was no longer working. I couldn't find a similar (small window, always there, only stock prices) app that did what I wanted, but I did discover mop, a Go program that runs in Terminal. Using mop and Terminal's ability to save a window layout, I was able to craft a solution that worked for me.
Then commenter smayer97 asked…
Any solution to replace the mini-graphs at the bottom of the old Dashboard widget?
I didn't pay much attention to the graphs in the widget, so I hadn't considered them in my solution. And there's no way I was going to find a tidy graphing solution that also worked in Terminal. What I came up with isn't quite as convenient as having the graphs available at all times, but it's pretty close—I just have to click on a ticker symbol while holding down some modifier keys:
As you might have guessed, this is powered by a Keyboard Maestro macro, and I love how well it works.
Say I’ve resized a window to the dimensions I want. Is there a way to figure out what these are so I can create a resize action in Moom?
Basically, the user wants to save a window size as a custom action, to make it easy to reapply that action to any window. (If it were just one window in one app, you could use Moom's Save Window Layout feature to save that layout for easy recall.)
There is a way to see this info in Moom, but it requires enabling our debug log and digging through a bunch of output. As an easier alternative, I was certain that AppleScript could do this; I fiddled a bit on my own, and did some web searching, which led me to this thorough post on StackExchange.
Using the very first bit of the first script there, I came up with this version:
Of course, me being me, I decided I'd spend a couple hours making it more useful, even though I probably won't use it all that often. So I modified it to work for whichever app is frontmost, and made it run from Keyboard Maestro. I then assigned it a gesture trigger with my mouse, so I can easily see any window's dimensions with a simple mouse movement.
We don't publish all of these, as we're not necessarily ready for them to be put to use by everyone (otherwise, they'd be visible prefs). But there are cases when a user has a specific need for a setting, or when troubleshooting, that these hidden prefs can be very useful. As such, I often have to send someone a defaults write command.
Read on to see how I use Excel's formatting features—plus the ever-valuable Keyboard Maestro—to disguise some of this workbook's formula results, yet still easily copy them for sending to a user.
Note: Revised on December 4, 2018 with a much better implementation of the pop-up palette, and some changes in timing and mouse movement.
One of the "problems" with Keyboard Maestro is that it's so useful I use it a lot, leading to a large collection of macros. Due to the number of macros, sometimes when I want to add a new shortcut, I can't remember if I've used that shortcut before or not. Today's tip comes in two flavors to address that problem: Simple and Complex.
The Simple solution
Short of just trying the shortcut, there's a way to check from within Keyboard Maestro itself: Type the macro's activation keys into the search box, as seen in the box at right.
You can't do this by pressing the actual shortcut keys—you have to type their character representations. You can do this with the "Show Emoji & Symbols" option under the flag icon in the menu bar, if you've enabled it in the Keyboard System Preferences panel. But finding those few special keys (if you even know how to search for them) is a pain.
Technically, you could also use the pop-up character palette macro I wrote, except there's an issue: When the palette activates, it deactivates the search box, so the characters don't make it there. It's also overkill for this task, because there are characters that wouldn't be part of keyboard shortcuts, and you'd never need the HTML codes, just the characters.
So I wrote what wound up being a set of new macros that make searching for assigned keyboard shortcuts much easier.
Last fall, I finally made the move from iPhoto to Photos…months later, I still find myself frustrated by many things in the Photos' user interface.
Today's aggravation dealt with cleaning up a bunch of older photo albums—some I just wanted to delete, others I wanted to convert from Smart Albums into normal albums (because I wouldn't be adding any more photos that used the keywords in the Smart Album). That meant I wanted to delete a bunch of albums—well over 100.
Deleting an album in Photos can only be done from either the My Albums overview, where you can select more than one (though not across folders), or via the contextual menu in the sidebar.
The My Albums view wasn't going to work for me, as I needed to look at and work with many of the albums, across many folders. But after the sixth time of doing the "right click, select Delete Album, tab to Delete in the confirmation dialog, press Return" dance, I was sick of it. Time for another Keyboard Maestro macro.
This one is very simple—it just replicates the actions required to delete an album. With it in place, I click on the album I wish to delete, then press Control-D. It's still more mouse interaction than I'd prefer—why can't I select albums via the keyboard?—but it's oh so much faster than using the contextual menu.
Between Many Tricks and this blog, I spend a lot of time in browsers. Most of the time, I use Safari, but I do occasionally work in Chrome and Firefox, too—most often to check how a page looks or functions.
I keep my "permanent" bookmarks in Safari, and don't presently use any sort of cross-browser sync. (I used to use one, but had a lot of trouble with duplicates, so I stopped.)
I wanted a way to open a limited number of URLs in either Safari (if that's what I was in, or if I wasn't in a browser), or in the frontmost browser, if that browser were frontmost. I could just create the subset as bookmarks in each browser, but if I wanted to add or remove a page from the list, I'd have to do so multiple times.
In the end, I came up with a set of Keyboard Maestro macros that do exactly what I want. I access my short list of multi-browser URLs via Keyboard Maestro's pop-up palette, as seen at right.
This appears when I press ⌃1; after that, a single digit opens the desired URL. But how does it know whether to open the URL in Safari or one of the other browsers? It takes one helper macro, then one macro for each URL that I want to open in this manner.
What is this speedtest exactly? And what is brew, you may also be wondering? You may also be wondering why, if you have brew, Dave's command doesn't work…that's because it's actually brew install speedtest_cli…but I'm getting ahead of myself.
speedtest is a command line interface (i.e. Unix app run from Terminal) to the connection speed tests at Speedtest.net—you get the results without the fancy animated graphics. And Brew is "the missing package manager for macOS." In other words, it's an app to help you install (and uninstall) other apps.
Here's how speedtest looks in its default mode—note that I've sped things up greatly for the GIF…
Much nicer to me, though, is the simplified version:
No animated dots, just three lines with the results. As you might expect if you read here regularly, I also wrote a Keyboard Maestro macro (of course I did!) that makes it really easy to run the simple version of the test, and does some editing of the output to simplify the display:
If you'd like to install speedtest (and maybe add the macro)—even if you don't want to install Brew to do so—keep reading…
As my collection of macros has grown, and some of those macros have gotten more complex, I've been using a few of KM's features to help keep my macros organized, and make it easier to debug them while I'm working on them. Some of these are obvious, some maybe not so obvious, so I thought I'd share what I'm doing.
Yes, I posted a non-https image in the 'site is secure' post. Sigh.
So I took Jonathan's comment to heart, and created a Keyboard Maestro macro that ensures I post only relative URLs from now on.
Generally, I don't think such a thing would be worth sharing, as it's just a basic text replacement macro, right?. Mostly right, but in this case, I learned about a Keyboard Maestro feature that may be useful to others. So share I will…
I was working on something with Peter about Moom and its disk usage (it doesn't use much), and I was curious as to just how long Moom had been running on my Mac. I last rebooted my Mac a week ago, but I often quit and relaunch our own apps to run test versions.
Finder has this info, but that requires finding the running app in Finder. I wanted a quicker solution. In Activity Monitor (and ps in Terminal), you can see how much CPU time an activity has taken…
…but that doesn't really help at all with knowing when the app (or process) launched. As long as you're in Activity Monitor, you can get the information by doing the following:
Click once on the app or process of interest.
Press Command-I or click the small 'i' icon in the toolbar.
In the new window that opens, click Sample, then wait.
When the sample is complete, you'll see its output, and included there is the selected item's launch date and time: