Hs.hotkey.bind("alt-shift","tab",function()switcher:previous()end)Īdjust values such as shortcut bindings as you please, and that’s it. Hs.hotkey.bind("alt","tab",function()switcher:next()end) bind to hotkeys WARNING: at least one modifier key is required! Switcher = hs.() - default windowfilter: only visible windows, all Spaces As ever, the Hammerspoon docs are wonderfully clear and easy to follow (take a lesson, Apple!).
Hammerspoon download mac code#
Instead, I use the code below, which sets up the switcher’s ui as seen in the screenshots here with option tab and option-shift tab for shortcuts, but you can modify the appearance to suit your taste. The default code is a bit ugly for my liking. You can use the default code in hs.window.switcher docs or use mine below. With Hammerspoon up and running, adding the window switcher is just a case of cutting and pasting some code into your config file, saving it then reloading. But if you’re a regular reader of this blog, you’ll already have installed Hammerspoon after reading my earlier posts on it here and here and here.
Hammerspoon download mac full#
Another advantage here is that the window switcher will include full screen and non-full screen windows in multiple spaces, which command backtick typically does not handle well, something I find particularly frustrating when using Xcode.Īdding a window switcher is easy and doesn’t require any hacking.
This is particularly useful if you have a couple of windows open in several applications, and it is much faster and neater than first using command tab and then command backtick to cycle through an app’s windows. The window switcher allows you to jump between different windows, both those of other apps and the same app with a hotkey like option tab, which sits nicely next to command tab in my muscle memory! It will be ignored elsewhere.If you’re a big fan of the command tab Application switcher, you might enjoy adding a window switcher to your list of keyboard hotkeys. If you need support, support is given in the #streamersubalert-support chat on Discord. If you have read all the way to the end of this post, and you enjoyed it, please consider sharing this guide or taking a look at my Twitch Stream. Improving the Death CounterĪnd that’s it! This should work for all hot keys, and I’ve had it confirmed it does works with the Elgato Stream Deck.
Hammerspoon download mac software#
All you have to do is open up the text file in any text software and changing the number back to 0. Resetting the death counter is quick and easy. There is a slight delay but it isn’t much. You can then drag the death counter to wherever you wish. Set the font and styles and then click OK. Click “Browse” next to “Text File” and then browse to your text file. Give it a name (say “Death Counter”) and then tick the box next to “Read from File”. Within OBS click on the + in the “Sources” box and select “Text (FreeType 2)”.
If you don’t receive any errors & you used the exact file above, press cmd+alt+ctrl+W and you should see the counter increase. When done, click “Reload Config” and this will reload Hammerspoon. You paste the complete code into the Hammerspoon configuration file (the file opened when you clicked “Open Config”). This will bind it to cmd+alt+ctrl+W, so you can choose another hot key if you wish. You will need to replace the with the full path of the text file you created. Save the updated number to the same file.Now we need to create a script that we’ll bind to a keypress that will do the following:.