Animated app icons in your Dock that can run an arbitrary shell script when clicked.
![](https://private-user-images.githubusercontent.com/68946713/255093180-926a164d-164c-4b82-a254-48db7f8839b2.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3Mzc3NTIsIm5iZiI6MTcyMzczNzQ1MiwicGF0aCI6Ii82ODk0NjcxMy8yNTUwOTMxODAtOTI2YTE2NGQtMTY0Yy00YjgyLWEyNTQtNDhkYjdmODgzOWIyLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE1VDE1NTczMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAyZjFkZGY0ZjBjN2Q0NDBjN2U4ZGRhZDI2NTcwNGE3MDY1ODg0YTYwNmU4MjIwYmIxZmFkOTliNWUyYmQxNzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.DZaTkvYoYX0U-yfbgVlJnmD5AS5d6gPIze6rJWtwvQQ)
- macOS 13 (Ventura) or higher
- Xcode (or at least
xcodebuild
) version 14.1 or higher - Apple Development Certificate (Personal Team ID)
- Not too old
git
If you have the latest version of Xcode, the above requirements should be met.
laic (Live App Icon Creator) is a simple CLI tool to generate Live App Icons on macOS. There are 2 ways to install laic: using cargo
from Rust or download a binary.
If you are a Rust developer, the easiest way to install laic is with cargo
, since it is published on crate.io.
cargo install laic
There are pre-compiled binraies in the release page. You can manually download and install it in an appropriate location (e.g. /usr/local/bin
). Select laic-aarch64-apple-darwin
if you are using Apple Silicon Mac, or laic-x86_64-apple-darwin
if Intel Mac.
The following one line command will automatically download and install laic to /usr/local/bin
on Apple Silicon Mac:
curl -L -o laic https://github.com/fujidaiti/live-app-icon/releases/download/v0.1.0/laic-aarch64-apple-darwin && chmod +x ./laic && sudo mv ./laic /usr/local/bin
Or on Intel Mac:
curl -L -o laic https://github.com/fujidaiti/live-app-icon/releases/download/v0.1.0/laic-x86_64-apple-darwin && chmod +x ./laic && sudo mv ./laic /usr/local/bin
laic requires at least 3 arguments:
--name
: Name of the app to be generated. Used as its display name in the dock and app launcher.--gif
: Path to an animated GIF to be used as the icon of the app. If the width and height of the image are not equal, the image will be resized to a square according to the specified resize method.--command
: Shell command to be executed when the generated app is clicked.
The below is an example to generate an animated app icon that is named as "GitHub" that, when clicked, opens the home page of GitHub in your default browser.
laic --name "GitHub" --gif path/to/your/gif --command "open https://github.com"
There are other options that laic accepts:
-
--resize-method
: Specifies how the given GIF will be resized to a square. See Resize method for more details. -
--install-location
: Path to a directory the app to be installed. The default is$HOME/Applications
. -
--install-action
: Specify the action to be taken when the app is successfully installed.launch
launches the app immediately,open-in-finder
opens the directory where the app is installed in the Finder, andnone
does nothing. The default islaunch
. -
--verbose
: Noisy logging, including all shell commands executed.
Run laic --help
for more information.
If the width and height of the given animated GIF are not equal, laic resizes it to a square according to a given resize method:
center-crop
: Crops the center of the image with a square whose sides are the same size as the shorter side of the image.center-fit
: Puts the image on the center of a transparent square whose sides are the same size as the longer side of the image.
The default method is center-fit
.
It is recommended enabling the "Keep in Dock" option for the app so that the nice animation always catches your eye 👀.
![keep-in-dock](https://private-user-images.githubusercontent.com/68946713/255093500-cfe5ba4f-88b3-4834-a912-1475c53bc60a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3Mzc3NTIsIm5iZiI6MTcyMzczNzQ1MiwicGF0aCI6Ii82ODk0NjcxMy8yNTUwOTM1MDAtY2ZlNWJhNGYtODhiMy00ODM0LWE5MTItMTQ3NWM1M2JjNjBhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE1VDE1NTczMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU0ODdkNWE1YWQ1M2E3Yjg3YzkxNmExMTI1ZmMwZjRmMDUzNGNhZjAyZjY2NDZjMWZkMDNmNWIzYjM3YTY4M2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.oqHbLjc39KMgygQoqQw8gDgvabrppG4ZEt_9j9WGQ-U)
When the generated app launchs for the first time, it automatically adds itself to Login Items. This is because the animation of the app icon is only available while the app is running. You might notice that if you quit the app, the animation also stops.
![add-to-login-items](https://private-user-images.githubusercontent.com/68946713/255094092-e3ce73af-8284-421c-bb65-bfe8c0bc2efe.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3Mzc3NTIsIm5iZiI6MTcyMzczNzQ1MiwicGF0aCI6Ii82ODk0NjcxMy8yNTUwOTQwOTItZTNjZTczYWYtODI4NC00MjFjLWJiNjUtYmZlOGMwYmMyZWZlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE1VDE1NTczMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA0ODFmYWYyNzY0MzYxNmE4OTUwZWQyMjFjZjZjMDMwNjY1ZmRhMmNkODgxZTIwMTAzMjA2OGRjZmIyODJiOGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.sMVnBCsZBvsUsPB9FiwfdMfDMrybVbQM1ckX2nNyuj0)
In addition, the app will also require the permission to send notifications at the first launch. It will notify you in a notificaation if an error occurs while running the command.
![notification-request](https://private-user-images.githubusercontent.com/68946713/255093819-c49af839-4480-46df-852b-81d2c04c8572.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3Mzc3NTIsIm5iZiI6MTcyMzczNzQ1MiwicGF0aCI6Ii82ODk0NjcxMy8yNTUwOTM4MTktYzQ5YWY4MzktNDQ4MC00NmRmLTg1MmItODFkMmMwNGM4NTcyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE1VDE1NTczMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVlYzYzOWYzYmJhMzJlMjk2ZGZkOTFlMTA1ZDhhNjk0NzNhNDQyOGQzZDYyYWQ4MTEyNTUxYmE3MGQ2MjgxYjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.3-BH07lP_K4j9Eb52akAg68OONg-o5uitSPLy5v3O-A)
Since the generated app can run arbitrary shell commands, it is easy to perform complex workflows created with Shortcuts. Did you know that we can also run the shortcuts from the command line? For example, to run a shortcut named "My Shortcut", you could use the following:
shortcuts run "My Shortcut"
Then it is easy to integrate this shortcut with App Live Icon as follows:
laic --label "My Shortcut" --command "shortcuts run \"My Shortcut\"" --gif path/to/your/gif
Notice that you need to escape the doube quotes in --command
part since the shortcut name contains a whitespace. You can read Run shortcuts from the command line for more information about shortcuts
command.
If you have installed laic with cargo install laic
, just run cargo uninstall laic
.
If you have manually installed a laic executable, you can remove it like sudo rm /usr/local/bin/laic
, or move it to the Trash by hand.
Just move it to the Trash. The default install location is $HOME/Applications
unless you specify a specific directory at creation. You may also need to remove the app from Login Items and the Notifications section in the System Setting.
If you try to run the laic you downloaded, you might see a warning dialog like the one in the image below. This is because the binary is not signed by the identified developer. In this case, you must manually allow the app to run according to this article: Open Mac app from unidentified developer.
![warning-dialog](https://private-user-images.githubusercontent.com/68946713/255094241-1c67f1e5-02dd-4780-a6dd-af45b2ab7d90.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3Mzc3NTIsIm5iZiI6MTcyMzczNzQ1MiwicGF0aCI6Ii82ODk0NjcxMy8yNTUwOTQyNDEtMWM2N2YxZTUtMDJkZC00NzgwLWE2ZGQtYWY0NWIyYWI3ZDkwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE1VDE1NTczMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJkYjdlMDVmMWNmNTFkMDRhMDkyMDdjMDZhNzBiMWZhMGNkY2M1NDVkODZkMjdiMmVhNmNkYmY4MWQ0NWM5NTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ejXMeAvADAKjuspYknKGy8epVGpjpcrYYfEqPP-bNHc)
- The original idea by @neilsardesai
- DSFDockTile by @dagronf : A swift library that provides easy APIs for creating animated app icons.
- Funk Bass Sticker by @jsot : The image in this package has been took from https://giphy.com.
If you find any bugs or have suggestions for improvement, please create an issue or a pull request on the GitHub repository. Contributions are welcome and appreciated!
- Add option to notify the command outputs
- Allow more complex animations (e.g. attention concepts)
- Validate the arguments
- Refactor the code
- Improve the report messages
- Add tests
- Check the requirements before run
- Create a GUI icon generator
- Provide a way to create animated icons without Xcode