![]() I also have a hotkey I can hit when I plug in my external monitor that arranges all my apps between monitors in the way I like them instantly. Various other hyper shortcuts do things like toggling mouth noise recognition. Pressing hyper with the right home row moves a window between full screen, halves of the monitor, and between screens. Pressing hyper in combination with the left home row jumps directly between my most frequently used apps (Chrome, Sublime, iTerm2, Mail, Path Finder) and a pair of keys that mark a certain window and focus it, for all the other apps I use occasionally like PDF readers when writing LaTeX. I have a custom modifier key on my keyboard that is dedicated to window management I call hyper. I love being able to customize my window management shortcuts perfectly for the kind of things I normally do. Just goes to show the variety of user interface scripting tasks Hammerspoon can do. It’s one of my zanier uses of Hammerspoon but it is nice to use nonetheless. Previously I had to contort my hand into a cramped position on my chest to scroll with the trackpad while lying on my back. Personally I use this module to scroll pages hands-free while lying down on the couch with my laptop. ![]() It is based off some low-latency high-accuracy mouth noise recognizers I wrote during my research term at the UWaterloo HCI lab. Most recently I contributed a module for recognizing mouth noises. It uses Hammerspoon’s various powerful built-in modules including the drawing module, the app watcher module, and the window listener module. This module was very different to write since it was pure Lua. I later repurposed it to switch between Sublime Windows for the same reason when I switched back to Sublime Text. This module allowed me to wrangle Emacs windows to more easily switch between different projects. This was originally motivated by my switching to Spacemacs and it not having a good solution for working on many different projects like Vim tabs. The tabs sit in the top right of the title bar and allow you to easily switch between windows of an app with keyboard shortcuts (e.g ctrl+tab number) and later by clicking. The second Hammerspoon module I wrote was one that allows you to add tabs to any OSX Application. It didn’t take much time, and is very enjoyable to use, and because the module was added to the core Hammerspoon distribution, lots of other people can also benefit from it. The module was written mostly in a single evening as a native Lua module (originally for Mjolnir, the precursor to Hammerspoon). They allow you to switch to any window with only two keystrokes: One shortcut to bring up icons and letters for every window, and then simply hitting the key corresponding to the window you want. ![]() The first Hammerspoon module I wrote was a port of Slate’s window hints, which if you’ve ever used Vimium or Vimperator, are like link hints for windows. This post explores some of the ways I’ve used Hammerspoon to greatly enhance my general OSX-using experience. ![]() I think of it more as a general-purpose tool for modifying OSX’s user interface than just a window manager. It’s fully configurable with Lua, has tons of built in modules and it is simple to write your own modules. Hammerspoon gives me most of the power that a fancy Linux tiling window manager and configurable desktop would give me, without having to switch operating systems. Advanced Hackery With The Hammerspoon Window ManagerĪlong with Dash, Sketch and Papers, one of the main reasons I haven’t yet switched to Linux is Hammerspoon. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |