

But there are things that you can’t do with Automator alone.Ģ. OS X already comes with Automator, which allows you to do automation on Its not exhaustive, but its good enough for not-so-complex My finger basically rests on the Right Command key.However, unlike Javascript and Ruby, Lua does not have a built-inįunctional library to do things like map, filter, reduce,Įtc., but Hammerspoon comes with hs.fnutils which provides a bunch ofįunctional utilities. That's an incredibly small amount of CPU power used for an app that I use 20 times a minute. In the following case, from the time rcmd started running (3 days ago) until now, it only consumed about 20 minutes of CPU time. By default Activity Monitor updates every 5 seconds, so even if the CPU % was at 7% for a few milliseconds, you'll still see it for 5 seconds.Įven with the Very often (1 sec) setting, the % CPU metric is still not best for judging app efficiency. Usually, you shouldn't look at the % CPU field, but at the CPU Time metric. The compute workload is minimal and the spike only lasts a few milliseconds.

This is used in the scoring algorithm for choosing which apps get priority in the dynamic first letter assignment. Rcmd has to listen on window change events and keep track of how often an app is switched to. Looking at the % CPU usage is not a very accurate way of judging the app's efficiency.Įspecially on M1, read more about it in this article: CPU percentage is misleading on M1 Macs by The Eclectic Light Company Why do I see CPU usage spikes? Keep in mind that you can always change the trigger key to something else than Right Command if that key is not working on your keyboard. Changing the Modifier Keys settings in System Preferences.If you don't see those key codes exactly, then it's a problem with your keyboard mapping. Now if you press your Right Command key and click on the Info button you should see: You can check what keycodes get sent by downloading this simple app: Ke圜odes.zipĪfter launching it, check the Log key up events and modifier changes checkbox. It's possible that your keyboard is sending the wrong key codes. Left Command triggering rcmd? Right Command+ letter not doing anything? Rcmd will try to detect this and fix the problem itself but information about the binary may be missing and the detection doesn't always work.
Hammerspoon find close button for app update#
This usually happens with browser as they update frequently. This happens because that app has updated itself in the background while it was running.īecause the app on disk is different than the running app, the system creates another app instance when rcmd tries to focus it. To fix this, restart the app you are trying to focus. New window is opened when activating an already running app

Hammerspoon find close button for app windows#
There is a macOS native way to switch between windows of the same app: The Accessibility API would allow this in some manner but it is not allowed on the App Store. Unfortunately there's no macOS API that allows us to focus specific windows of an app. Pressing ⌘ + S yet again will cycle and focus ShortcutsĬan I cycle between windows of the same app?.Pressing ⌘ + S again will cycle and focus Spotify.If you have multiple apps with the same first letter, pressing that letter multiple times will cycle between those apps.įor example, if you have Safari, Spotify and Shortcuts running: Music and Mail)?īest way to handle this is to assign a custom key for the second app.įor example, if rcmd focuses Mail on ⌘ + M and you want to assign ⌘ + U for Music:Īnd that's it, from now on you can use ⌘ + U to focuse the Music app.

What do I do if I have two apps with the same first letter (e.g. Make sure you're running rcmd v2.0.1 or later, check if the Apps Key is configured correctly and restart the app. There was a bug in the migration of the settings and in handling number keys in v2.0.0.
