Skip to content

Instantly share code, notes, and snippets.

@twio142
twio142 / Alfred Running Apps
Last active November 25, 2021 15:40
An Alfred JXA workflow to list currently running apps, with fuzzy match
#!/usr/bin/osascript -l JavaScript
// Adapted from the original script of @deanishe
// https://git.deanishe.net/deanishe/alfred-quit-apps/src/branch/master/DockApplications.js
ObjC.import('AppKit')
ObjC.import('stdlib')
function run(argv) {
let apps = ObjC.unwrap($.NSWorkspace.sharedWorkspace.runningApplications)