![]() ![]() Hold ⎇ for 70/30." ) : searchSubText ( true ) : choices ( windows ) : show () movewindows : exit () while it's not terribly complex, it's a good example of the powerful tools Hammerspoon gives you to build your own automations.įirst we set up the modal and bind it to our old friend Hyper.Ĭhooser : placeholderText ( "Choose window for 50/50 split. I then hit `v` to enter my split window chooser, then I choose the window I want alongside my "work" window and everything is ready to go! Hitting HYPER+m allows me to enter my window movement modal. Realizing just how common this particular use case is, and inspired by how easy it is to split a screen in vim using fzf.vim, I wrote a function to make my life easier. Switch to my reference, enter move mode, move it to the right.Switch to my work, enter move mode, move it to the left.Flip back and forth (efficiently using a!) a few times before realizing that I need them both at the same time.Go find that material, open it up full screen.Realize I need some reference material.Sometimes it's Dash.app, some other reference material, or a ticket. There is one use case where I'll commonly have two windows open… one to work on, the other for reference. I work on a laptop monitor a lot, and even at my nice setup at my desk I try to keep my main monitor on a single app. While much of a is very simple, there are two automations that I'm proud of. In my configuration, a isn't very complex or interesting, and a lot of it was written originally by Tom Miller. ![]() I used to think multitasking was a super power of mine, now I think it's my kryptonite. While ten years ago I would have leapt for the tiling options 1 (I still would like to give i3wm a go one of these days!) I have been making an effort to only have one application in view at any given time. There is a lot of awesome Hammerspoon code to help you with that, from clones of popular Mac applications like Spectacle to complex tiling systems. Lots of people! You can find out more on our Contributors page.One of the main things people do with Hammerspoon is wrangle their window layouts. If you find a bug, or have a suggestion, you can also file an issue on the issue tracker. You can usually get a quick answer in our IRC channel, #hammerspoon on Libera. For more information, see the contribution guidelines on GitHub.īugs found on can be reported on GitHub Where can I get help? They can either be pure Lua scripts that offer useful helper functions, or you can write Objective-C extensions to expose new areas of system functionality to users. More extensions will always be a huge benefit to Hammerspoon. You can learn more about the Lua scripting language at lua.org. If you are new to Hammerspoon, read the Getting Started Guide with reference to the full API documentation. You will need to create a Lua script in ~/.hammerspoon/a using our APIs and standard Lua APIs. Out of the box, Hammerspoon does nothing. If you are using an older Mac which is not running a recent version of macOS, please consult our Release Notes for a version which is compatible with your system. How do I install it?ĭownload the latest release and then drag the application to /Applications/. You might want to do something crazy like have iTunes automatically start playing when your Mac detects you are in Paris. You might want to display an alert when your battery drops below a certain percentage. You might want to run a series of commands when your wifi interface connects to your home network. You might want to bind a keyboard shortcut to a series of window operations, or an applescript. Typically you would write a configuration file in Lua that connects events to actions. If you want to explore the options Hammerspoon offers, check out the Getting Started Guide and the full API documentation as well as the already pre-made plugins called Spoons. You can write Lua code that interacts with macOS APIs for applications, windows, mouse pointers, filesystem objects, audio devices, batteries, screens, low-level keyboard/mouse events, clipboards, location services, wifi, and more. What gives Hammerspoon its power is a set of extensions that expose specific pieces of system functionality, to the user. At its core, Hammerspoon is just a bridge between the operating system and a Lua scripting engine. This is a tool for powerful automation of macOS. ![]()
0 Comments
Leave a Reply. |