Hammerspoon



Hammerspoon Alternatives. Hammerspoon is described as 'This is a tool for powerful automation of OS X. At its core, Hammerspoon is just a bridge between the operating system and a Lua scripting engine' and is an app in the OS & Utilities category. GitHub is where people build software. More than 56 million people use GitHub to discover, fork, and contribute to over 100 million projects. This is a direct port of my Mjolnir Workflow. Installing Hammerspoon is much simpler without any external modules needing to be installed. Everything is internal.This workflow is for running scripts using Hammerspoon to control your windows. This is just a sample of the things that can be done. Hammerspoon is doing the stuff talked about here using event taps. I don't know if you can reliably use event taps to simulate different modifiers though, or to prevent a modifier from actually taking effect (e.g. If you wanted to remap one modifier to another).

CommandPost is a free and open source native macOS application that acts as a bridge between control surfaces, and software that doesn’t natively support control surfaces, such as Apple’s Final Cut Pro X and Adobe After Effects.

It’s been downloaded over 81 thousand times, and nearly 2 thousands members in our Facebook Community.

It’s used by filmmakers, scientists and just general macOS fans all over the world to seriously speed up mundane tasks through powerful and customisable automation tools.

For example, you can apply individual effects within Final Cut Pro or After Effects with the single tap of a button. It also has powerful Windows management tools.

Developed in Lua (the same scripting language used by Blackmagic Fusion, Adobe Lightroom and even parts of Apple iOS), it’s insanely customisable and powerful.

It’s also fully compatible with Hammerspoon.

Line for mac

Memory clean big sur. You can listen to Chris explain CommandPost on Final Cut Pro Radio Episode #57 and Episode #43.

To help continue CommandPost to grow, evolve, and stay completely free and open-source, we offer the ability to sponsor CommandPost directly through GitHub.

  • Sponsor Chris on GitHub here.
  • Sponsor David on GitHub here.
  • Sponsor CommandPost on GitHub here.

Alternatively, you can also make a contribution via PayPal.

You can download CommandPost here.

Please review our license agreement and privacy policy before downloading.

CommandPost supports macOS High Sierra, Mojave, Catalina & Big Sur.

It has native support for both Intel and Apple Silicon Mac’s.

It requires Accessibility Permissions, so you’ll need your computer’s Administrator Password.

macOS Catalina & Big Sur now require Screen Recording permission, so we can determine window positions.

CommandPost supports Final Cut Pro 10.4.4 to 10.5.2.

It has basic support for Adobe After Effects 2020 or later.

It has experimental support for DaVinci Resolve 16.2.7 or later.

It has built-in basic support for the latest versions of:

  • Apple Compressor
  • Apple Motion
  • Cisco Webex Meetings
  • Ecamm Live
  • Microsoft Teams
  • Skype
  • Zoom

If you have a specific post production workflow problem you need to solve or automate, we can help.

We’ve developed custom plugins and solutions for post production studios, production companies, and individual editors all over the world.

For example, we developed a transcription plugin for Apollo: Missions to the Moon (edited by David Tillman) as well as specific CommandPost features for Denmark’s second largest production company, Metronome Productions.

Hammerspoon

The FCPXML Titles Processor, and Shot Data in CommandPost’s Toolbox are other examples of commissioned tools.

Email us to discuss your specific requirements.

Here’s a collection of awesome videos made by members of our community in English:

…and in other languages:

CommandPost has hundreds of useful professional features. Here are some of our favourites:

Final Cut Pro

  • Scrolling Timeline
  • Save & Restore Browser Layouts
  • Batch Export from Timeline
  • Highlight Browser Playhead
  • Pasteboard Buffer
  • Color Inspector controls on the MacBook Pro Touch Bar (or using Duet)
  • Watch Folders
  • Shared Clipboard & Clipboard History
  • Timeline Zooming with Mouse Scroll & Modifier Key (includes Magic Mouse)
  • Mobile Notifications (Prowl, Pushover & iMessage)
  • Apple Watch & Android Wear notifications (via Pushover)
  • Enable Rendering During Playback
  • Ignore Inserted Camera Cards
  • Advanced HUD with FCPXML & Pasteboard Editor

Finder

  • Make Pasteboard Contents Uppercase/Lowercase, etc.
  • Windows Management/Resize Tools
  • Shortcut for Un-mounting External Drives
  • Enable/disable chime sound when laptop power is connected

For more information check out our User Guide.

CommandPost currently supports:

  • Tangent Panels (including Tangent’s iPad & Android App)
  • MacBook Pro Touch Bar Support (including a Virtual Touch Bar)
  • MIDI Devices (including TouchOSC, etc.)

We are also currently actively working on support for:

And investigating support for: Affinity photo 50 discount.

The best way to get support is via the CommandPost > Provide Feedback button in the CommandPost menu.

You can also post issues and feature requests on the CommandPost GitHub Page. Registering with GitHub is free, and we actively monitor these requests.

Alternatively, you can always email us via team@commandpost.io.

CommandPost was created by Chris Hocking as a proof-of-concept to make finding the Final Cut Pro browser playhead easier for Scott Simmons (you can read the origin story here).

It’s now developed, maintained and supported by Chris Hocking & David Peterson through GitHub.

For anyone usingHammerspoon and folder ‘watchers’ to alert them to changes to a given folder, I’ve updated the watcher function I wrote about here

The problem with the simple alert I demonstrated last time is that it only hangs around for a second or two (much less than a Folder Action alert, which takes a couple of minutes to time out). In this updated function, it now also writes a list of the file changes to a (by default) file on the Desktop. The write is an append: if the file doesn’t exist it will create it before writing; if it does exist, it will append the latest changes and date to the file. This way, even if you miss the alert, you’ll always have a record of what files have been added, deleted or modified in your watched folder.

In this example, the folder being watched is ~/Library/LaunchAgents since we want to be aware of any adware, malware or other unsavoury processes being surreptitiously added by, for example, apps we download from the internet. Although there are, of course, many legitimate reasons for apps placing items in here, this folder is prime real estate for attackers as it is one of the locations that can launch processes at log in time without the user’s interaction (or knowledge).

Here’s the code, also available from my pastebin here. A code walkthrough follows.

function writeStringToFileWithMode(aString, aPath, aMode)
local this_file
this_file = io.open(aPath, aMode)
this_file:write(aString)
this_file:close()
end
function myFolderWatch(files)
local str = 'Launch Agents folder was modified on ' . os.date() . ' :nt'
local this_path = os.getenv('HOME') . '/Desktop/LaunchFolderModified.txt'
local ignore = 'DS_Store'
local count = 0
for _,file in pairs (files) do
count = count + 1
i = string.find(file, ignore)
if not i then
str = str . file . 'nt'
else
if count 1 then
str = 'n'
end
end
end
str = str . 'n'
writeStringToFileWithMode(str, this_path, 'a')
if string.len(str) > 2 then
hs.alert.show('Launch Agents folder was modified.')
end
end
local aWatcher = hs.pathwatcher.new(os.getenv('HOME') . '/Library/LaunchAgents/', myFolderWatch):start()


Code walkthrough
The first function, ‘writeStringToFileWithMode’ is just a convenience function. Hopefully the clue is in the name. The ‘aMode’ parameter is either “w” for write(over) or “a” for write(append).

The myFolderWatch function starts off by declaring some local variables.

‘str’ includes the initial line that we want to write to our output file and interpolates the time of the change by calling os.date().

‘this_path’ defines the path that we want to write our list of file names too.

The ‘ . ‘ in both these assignments is a string concatenator (i.e., like ‘&’ in AppleScript or ‘stringByAppendingString’ in Obj-C).

‘ignore’ is a string that will help us to exclude .DS_Store files from triggering the alert or appearing in the list of file changes.

The ‘count’ variable is an internal var we need in order to eliminate .DS_Store changes when it’s the only change. Lua doesn’t have an easy way to count entries in tables, so we bascially iterate a variable each time through the loop to achieve the same effect.

After that, we have the ‘for’ loop. For loops in Lua are weird (at least for me), as you’ll see that they have this structure for a,b in pair (aPair). I won’t go into why, other than to say its a result of Lua’s table data structure. The '_' here is just a dummy variable for the first parameter. The ‘files’ in parentheses are the list of file names (not file specifiers, you AppleScripters!) that were added, deleted, or modified in the watched folder.

The loop begins by incrementing the count, then checks for the ignore file (.DS_Store). If the ignore file is not found, we then append the filename to the str variable.

If it is found, we check the count. If the count is ‘1’ (i.e., the only change was .DS_Store) we discard the entire str var and replace it with new line character. If the count is more than 1 we don’t do anything to ‘str’. We just ignore adding anything to it all.

Hammerspoon Spoons

At the end of the for loop we add another new line to the string just so our outputted text file looks nice and neat.

Hammerspoon Mac

Then we call the write function mentioned above, passing ‘a’ (append) for the mode.

Finally, we fire the UI alert on the condition that the string has got more than 2 characters in it (if it didn’t it was just the “nn” string from ignoring the DS.Store file).

After the function definition, the aWatcher variable sets up the watcher on the path we want to observe and tells the watcher to start monitoring. It tells the watcher to call our myFolderWatch function when anything happens.

Deploying the code
After editing the config file, remember there’s two steps: i. save the file and ii. choose ‘Reload Config’ from the Hammerspoon menu.

Hammerspoon Seal


Further Reading:
More details are available about Hammerspoon from the official site here.

Hammerspoon Linux

My beginners guide with the original simple watcher function is here.