Headspace v1.0

hammerspoon logo

I’ve been playing around with using Hammerspoon to modify my interaction layer in OSX to enhance efficiency while maintaining focus.

I’ve been working daily with Headspace since I finished it… and I’ve made a couple updates!

🥄 It’s a spoon

I’ve pulled the script out into a spoon, so you can use it without having to clone my entire setup. 🎉

🧭 Requiring intent

requiring intent

A huge reason I fell in love with using Toggl to track my time was declaring my intent on how I intended to spend my time. I have added a field for a space called intentRequired. If true, Headspace won’t let you enter that space without prompting for a Description (which will be logged to Toggl.)

Headspace now pull the frontmost window’s title as a suggestion, so you can just roll with that or enter your own. Using the window title is really good for entering meetings! I’m excited to have more definition to my weekly Toggl reports.

As before, you can also just enter a description by inclosing the description in quotes.

⏲ Pomodoro Timers

While I was rewriting the parser for the query, I added the ability to add a timer to a space. When typing out the first query, you can specify the time you want to stay in that space in minutes with :<integer>. So shall :5 will match the space named Shallow for 5 minutes, then it’ll play a sound and prompt for a new space. This is great for time-blocking for play or email.

🏎 Faster!

Most importantly for my daily use… it’s a lot faster. By making the HTTP request to toggl.com asynchronous, the UI can display immediately instead of blocking for the response. Much better.

Breaking Changes:

  • all snake_case variables are now camelCase, update your space definitions accordingly.
  • layout now uses hs.window.layout.apply() instead of my Autolayout library… I’m going to slowly switch over everything to use that anyway.
  • I changed the API to match what seems to be the Spoon standard, and that also means the way that the Toggl API key is loaded (decoupled from secrets.lua).