Last active
December 8, 2022 12:10
-
-
Save ccnokes/af3a1fe7434e284650693787f99d4e1c to your computer and use it in GitHub Desktop.
Bash script that checks for apps that use Electron. Detailed a bit more here: https://cameronnokes.com/blog/how-to-know-if-a-desktop-app-uses-electron/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
target="${1:-/Applications}" | |
check() { | |
stat "$1/Contents/Frameworks/Electron Framework.framework" &> /dev/null | |
if [[ $? = 0 ]]; then | |
echo "$1 uses Electron" | |
fi | |
} | |
export -f check | |
find "$target" -maxdepth 2 -type d -name "*.app" -exec bash -c 'check "{}"' \; | |
# give this script executable permissions (chmod +x), then run. By default it'll check /Applications |
Thanks for the suggestion darzo! I just made /Applications
the default. Should have done that from the outset.
This is brilliant !
Saw your post https://cameronnokes.com/blog/how-to-know-if-a-desktop-app-uses-electron/As some Hackintosh machines can sometimes lag due to Electron apps, I needed to find out how to determine which apps are the culprit, your site link was one of the top hits and the best! Hint, hint - Hackintosh / cursor lag may be tags to add to that page.
Also, while I overstate the comment, entering "/Applications" as a parameter for the script was sufficient to output the apps, adding the suggestion in the echo might save someone a few seconds.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is brilliant !
Saw your post https://cameronnokes.com/blog/how-to-know-if-a-desktop-app-uses-electron/
As some Hackintosh machines can sometimes lag due to Electron apps, I needed to find out how to determine which apps are the culprit, your site link was one of the top hits and the best! Hint, hint - Hackintosh / cursor lag may be tags to add to that page.
Also, while I overstate the comment, entering "/Applications" as a parameter for the script was sufficient to output the apps, adding the suggestion in the echo might save someone a few seconds.