by d4rky · 7y ago · 0 comments
If you create the following plist in ~/Library/LaunchAgents, macOS will set that env variable every time you log in (except if you tell it to reopen windows when logging back in). Change "NAME.OF.FILE" to the plist's filename without the .plist extension.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>NAME.OF.FILE</string>
<key>RunAtLoad</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
<string>launchctl setenv SLACK_DEVELOPER_MENU true</string>
</array>
</dict>
</plist>I’ve made electron apps that load a website I have no control over and added features to it, including new styling, keyboard shortcuts, and command-line flags.
I would have built a native app, but documentation on making macOS app is awful while electron’s documentation is top notch.
My favorite Electron app is Balena Etcher. It is "dd" but uses 200MB of RAM. It is AMAZING.
Only regular menu appears on right-click.
It worked for me:
export SLACK_DEVELOPER_MENU=true
open /Applications/Slack.app
SLACK_DEVELOPER_MENU=true /Applications/Slack.app/Contents/MacOS/Slack