

Credits to Shantanu Goel who built some cool things with Hammerspoon and his latest post gave me the idea (& motivation) to build this.I have been looking at Hammerspoon to build something for sometime now, and this does not even scratch the surface of whats possible. We create a hotkey combination to manually refresh.We set this function to refresh data every 15 minutes.
HAMMERSPOON APP UPDATE
HAMMERSPOON APP CODE
The code (IMO) is quite straightforward - At its core, Hammerspoon is just a bridge between the operating system and a Lua scripting engine' and is a Task Automation app in the os & utilities category. doEvery (POLL_INTERVAL_MINUTES * 60, callGitLab ) callGitLab ( ) bind (, "G", function ( ) callGitLab ( ) end ) decode (data ) updateMenuBar (todos ) end ) end asyncGet (GITLAB_TODO_API, headers, function (status, data ) Gl_menu : setClickCallback (onMenuClick ) function updateMenuBar (todos )Ĭounter = 0 for index in pairs (todos ) do URL to open when the menu bar is clicked local MENUBAR_CLICK_URL = "" - GitLab access token to make the API call local GITLAB_TOKEN = "" - TODOs API URL local GITLAB_TODO_API = "" local POLL_INTERVAL_MINUTES = 15 function onMenuClick ( ) I have never written a single line of Lua in my life before, but even then thanks to great documentation by Hammerspoon and the set of extensions already available, it did not take long to make this functional “app”Īfter installing Hammerspoon, open your a file and add the following For those who are not familiar with Hammerspoon, it is a MacOS automation that makes it super easy to interact with the operating system using a Lua Scripting Engine. So, to keep on top of my todos, without having to open GitLab all the time, I created a little Hammerspoon script that simply keeps the count of todos in my MacOS menu bar. A Todo is created anytime an issue is assigned to you, a Merge Request requires your review or someone mentions you in a comment, hence the Todos page serves as a hub for you to figure out what you can help with or what you can work on next. One nice concept that GitLab uses is that of Todos. ☝ Raycast allows defining shortcuts for many actions, including launching apps.įor my MacBook, I used Hammerspoon, a hotkey automation suite for MacOS.At SpotDraft we use self-hosted GitLab to host our source code and manage projects. The simplest one I think is with Raycast. There are many ways this can be achieved in MacOS. ☝ Just a small selection of the shortcuts I use. For something I do hundreds of times a day, it all adds up! 🎉 The result: I save a second of thinking for every app switch I do. For example, ctrl-win-w will always focus my web browser, where alt-tab requires some thinking to figure out how many Tabs to press. I settled a way that’s easier for me: shortcuts that always do one-and only one-thing. cmd-space firefox to use Spotlight (MacOS).alt-tab-tab-tab to switch to a window (Windows and MacOS) All files can be edited, add or modify the elements, change the color, etc.
HAMMERSPOON APP WINDOWS

☝ Has this been as frustrating for me as anyone else? I found a way to make this faster, which has made my workflow a lot more efficient.

Switching apps is something I do hundreds of times a day on both MacOS and Windows.
