

- #HAMMERSPOON HYPER KEY HOW TO#
- #HAMMERSPOON HYPER KEY FULL#
- #HAMMERSPOON HYPER KEY CODE#
- #HAMMERSPOON HYPER KEY WINDOWS#

I've been using Headspace daily for about a month. tracking presets per space… or a custom input at any time.Block distracting a shortcuts to protect focus.Launch relevant applications and quit distracting applications based on tags.Define workspaces for your important work:.Fully configurable for you and your work-style.

If you want to share this video with someone, it's on youtube. Headspace has been the title of this series, and it's what I call the last automation in this series. I'm pretty sure that I've been working on it alongside the name-sake tool for a straight month. Just add the following at the very end of a: - watch config for changes and reload when they occur Hammerspoon also supports reloading its configuration files upon detecting changes. Hs.hotkey.bind(hyper, 'l', gridset(1, 0, 1, 2)) - right half Hs.hotkey.bind(hyper, 'k', hs.grid.maximizeWindow) Hs.hotkey.bind(hyper, 'h', gridset(0, 0, 1, 2)) - left half Hs.hotkey.bind(hyper, 'j', toNextScreen()) function to move window one screen left or back if it's already on theĬurrentWindow = hs.window.focusedWindow() Os.execute("open /Applications/iTerm.app")Ĭonfiguring Window Movement Hotkeys - a helper function that returns another function that resizes the current window Os.execute("/System/Library/CoreServices/Menu\\ Extras/nu/Contents/Resources/CGSession -suspend") These two actions can be bound to keys via: - locking Stuff I regularly want to do is get an iTerm open or locking the screen.

I want to automate a few things via hotkeys.
#HAMMERSPOON HYPER KEY HOW TO#
How to achieve that thou is left as an exercise for the interested reader -) Easy bits first - application launching This combination of keys might also be mapped to a single key by virtue of Karabiner, a cool program allowing arbitrary key remappings and much much. I also define that I want a window grid size of 2x2, with no margins: local hyper = I use a set of modifier keys for all of the hotkeys, let's call that set hyper. So let's have a look at that:įirst, Hammerspoon's config resides in the file ~/.hammerspoon/a.
#HAMMERSPOON HYPER KEY WINDOWS#
For me, these are arranging windows grid-like on screen and have e.g. However, if you have about 30min at hand, you can already hammer out a nice configuration for the things that are most important for you to automate or hotkey. The configuration (it basically comes with no defaults) can be a bit daunting in the beginning - in fact, I had stumbled upon Hammerspoon already some time ago but didn't invest the effort back then.
#HAMMERSPOON HYPER KEY CODE#
The following code snippets have been heavily inspired (read: copied) by philipalexander's, tstirrat's and cmsj's Hammerspoon configs on Github and also by Tristan Hume's post on configuring Mjolnir, of which Hammerspoon is a fork. if Thunderbolt Display connected, put Xcode on that one and Mail on the internal one)
#HAMMERSPOON HYPER KEY FULL#
Lately I've been using Magnet (formerly known as Window Magnet, App Store, $4.99), which is pretty nice but I felt it is not using the concept of moving stuff around with the keyboard to the full extent: While you can surely put windows in one quadrant of the screen or something, there's no option to e.g. Being a big fan of using the keyboard for everything and not touching the mouse more than necessary, I went through different OSX helper applications for helping to move windows around, aligning them on screen, etc.
