![]() ![]() ![]() I do think that it might be useful for doing quick stuff in time-sensitive situations, like hiding all the stuff except the browser window when you’re about to share the screen. My typical workflow these days is opening a tab in Chrome or Slack and reading it □. I think it’s more due to the lack of imagination and not having a lot of workflows to automate. That said, I haven’t used Hammerspoon for anything else yet. I’ve been using my keyboard shortcuts for several months now, and I’m pretty happy with them - no more awkward Zoom meetings and clicking around device settings in GarageBand. I think Lua code is easier to understand and is not as UI-dependent, and I love the fact that I don’t have to use clunky Apple dev tools to develop my scripts, or port them to another laptop. I also didn’t know much about Lua, and having a quick and easy way to test my code made the whole coding experience rather fun.įor comparison, here’s how the same problem is solved using AppleScript. Fortunately, Hammerspoon has a simple REPL console where I could play with API, inspect its outputs and test my assumptions. The script is straightforward, but it does require some non-trivial knowledge about how audio device API works exactly, and which device ids should be used. Overlay text showing my current input and output devices The last one shows what’s currently used for input and output, using a non-intrusive overlay text.3 are used to select a specific audio device.It provides access to a wide range of APIs, from controlling window layout to managing various devices.įor my problem, I wrote a short script in Lua that configures 4 keybindings: Hammerspoon allows you to write macOS automation scripts in Lua and bind them to keyboard shortcuts. I was able to build exactly what I needed using Hammerspoon. ![]() “A quick way” usually means a keyboard shortcut - navigating audio settings UX in MacOS with a mouse is a frustrating experience, especially in the middle of an important video call. ![]() a quick way to tell macOS to use the device of my choice.a quick way to see exactly which device is used for input and output.It’s possible that macOS will become smarter over time, but for now I really needed two simple things: Like, it would choose to use bluetooth headphones as an output device and audio interface as an input device - I’ve had several Zoom calls derailed by that, and though rare, it’s pretty annoying. MacBook tries its best at guessing which audio device I want to use at any point in time, and sometimes it gets it wrong in non-obvious ways. My MacBook Pro is often connected to 3 audio devices: its own built-in speakers, bluetooth headphones and an audio interface with another pair of headphones and potentially another microphone plugged into it. Another productivity post! This time I had to learn Lua so that I could switch to my headphones via keyboard shortcut. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |