How to make the dock icon stop icon after running the shell application script?

So, I recently made a wrapper .appfor the zsh script, but when I run it, the application icon continues to jump in the dock.

Application mainly:

% find Example.app -type f
Example.app/Contents/Info.plist
Example.app/Contents/MacOS/wrapper.sh
% cat Example.app/Contents/Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
 <!-- tell OSX what the name of the executable is -->
 <key>CFBundleExecutable</key>
 <string>wrapper.sh</string>
</dict>
</plist>
% cat Example.app/Contents/MacOS/wrapper.sh
#!/usr/bin/env zsh
# not my real script, but something else that hangs for a while
sleep 10
%

You can also grab it from github .

Is there a way to get the app icon to stop the jump, and act like a regular app, and just sit there with a triangle next to it?

+3
source share
3 answers

OS X , . script, , Carbon Cocoa (. Carbon Event Manager NSApplication, ), Dock , GUI .

A script - , , - Platypus. script .

+6

DropScript. , - .

+2

, LSUIElement Info.plist, .

+1

Source: https://habr.com/ru/post/1710672/


All Articles