{"id":21167752,"url":"https://github.com/nicolodiamante/prune","last_synced_at":"2025-07-09T17:33:42.469Z","repository":{"id":204464469,"uuid":"711317583","full_name":"nicolodiamante/prune","owner":"nicolodiamante","description":"Effortlessly declutter the macOS Launchpad, ensuring swift access to your most-used apps, paving the way to a tidier, more organised Mac.","archived":false,"fork":false,"pushed_at":"2024-08-05T08:07:49.000Z","size":53,"stargazers_count":13,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-05T09:35:21.188Z","etag":null,"topics":["apple","apple-launchpad","apps","automation","clean-launchpad","launchd","launchpad","launchpad-organiser","macos","macos-launchpad","organiser","plist","shell","shell-script","utility","utility-scripts"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicolodiamante.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-10-28T21:42:34.000Z","updated_at":"2024-08-05T08:07:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"fab277ac-5bd5-4b68-83ef-6dc42bf1de5f","html_url":"https://github.com/nicolodiamante/prune","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"43839df5265f6e053875e0b940d365c9871e80e3"},"previous_names":["nicolodiamante/prune"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolodiamante%2Fprune","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolodiamante%2Fprune/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolodiamante%2Fprune/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolodiamante%2Fprune/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicolodiamante","download_url":"https://codeload.github.com/nicolodiamante/prune/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225578937,"owners_count":17491282,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","apple-launchpad","apps","automation","clean-launchpad","launchd","launchpad","launchpad-organiser","macos","macos-launchpad","organiser","plist","shell","shell-script","utility","utility-scripts"],"created_at":"2024-11-20T15:01:40.459Z","updated_at":"2024-11-20T15:01:41.534Z","avatar_url":"https://github.com/nicolodiamante.png","language":"Shell","funding_links":[],"categories":["automation"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/nicolodiamante/prune/assets/48920263/5726f14d-bd72-4ab9-a44a-874e09f87b78\" draggable=\"false\" ondragstart=\"return false;\" alt=\"prune\" title=\"prune\" /\u003e\n    \u003cimg src=\"https://github.com/nicolodiamante/prune/assets/48920263/1020d578-463a-4283-999f-1bbbdb15bebc\" draggable=\"false\" ondragstart=\"return false; \"alt=\"prune\" title=\"prune\" /\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\nThe [Launchpad][apple-launchpad] on a Mac serves as a quick access hub to all installed applications. With a simple gesture or a click, it displays an easy-to-navigate grid of app icons, providing a user-friendly way to launch applications without digging through the Applications folder. However, over time, as more applications get installed, the Launchpad can become cluttered with icons, including those of seldom-used or obsolete apps. This accumulation of icons can hinder easy access to frequently used apps, transforming a feature initially intended for convenience into a source of potential annoyance.\n\nPrune is a script designed to automate the removal of specified apps from the Launchpad, helping maintain a clean, tidy, and efficient app launch interface. By specifying which apps you want to keep or remove through a simple configuration, Prune takes care of the rest. It delves into the system, meticulously removes the selected apps from the Launchpad, and leaves it in a clean and organised state.\n\n\u003cbr\u003e\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003cimg src=\"https://github.com/nicolodiamante/prune/assets/48920263/ebb5be63-7db8-47be-bb5f-acc3230e4bf7\" draggable=\"false\" ondragstart=\"return false; \"alt=\"Launchpad\" title=\"Launchpad\" width=\"700px\" /\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\n## Getting Started\n\n### Installation\n\nThe installation process of Prune is streamlined for simplicity. You can automatically download and install Prune via `curl` by executing the following command in your terminal:\n\n```shell\nzsh -c \"$(curl -fsSL https://raw.githubusercontent.com/nicolodiamante/prune/HEAD/bootstrap.zsh)\"\n```\n\nIf you prefer a more manual approach, you can clone the repository to your local machine using `git` with the command:\n\n```shell\ngit clone https://github.com/nicolodiamante/prune.git\n```\n\nAfter cloning the repository, navigate to its directory in the terminal and run the installation script as follows:\n\n```shell\nsource utils/install.zsh\n```\n\nWhen you run the installation script, it performs two main actions to set up Prune on your system. Firstly, it copies the agent files into the `~/Library/LaunchAgents` directory. This step ensures that the necessary agent files are placed in the correct location, allowing the system to recognise and execute them as needed. Secondly, the script adds an alias to your shell configuration file `.zshrc`, making it easier for you to invoke Prune from the terminal.\n\n```shell\n# Launch the Prune script.\nalias prune='$HOME/prune/scripts/prune.zsh'\n```\n\nThese steps will ensure Prune is properly set up on your system, ready to assist you in managing your Launchpad efficiently and effortlessly.\n\u003cbr\u003e\u003cbr\u003e\n\n## How It Works\n\nPrune operates through a trio of components: a configuration file, a script, and a plist file for automation. The heart of Prune lies in its straightforward configuration file named `apps`, where you specify which apps to keep or remove from the Launchpad. It's crucial to write down the app names exactly as they appear on your Mac, including spaces, capitalisation, etc., to ensure accurate matching. Each app name should be on a new line and enclosed in single quotes, like so:\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003cimg src=\"https://github.com/nicolodiamante/prune/assets/48920263/fbaaf272-5d08-42ec-8fab-49803796cf9f\" draggable=\"false\" ondragstart=\"return false; \"alt=\"Prune Apps List\" title=\"Prune Apps List\" width=\"750px\" /\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\nBy managing the list of app names in the `apps` file, you are essentially guiding Prune on which apps to retain or remove from the Launchpad. The core script, `.pruneops.zsh`, reads this file, translates your preferences into actions, and executes the necessary commands to tidy up your Launchpad.\n\nFor continuous tidiness, Prune leverages a plist file, allowing it to run automatically each time your Mac starts. This plist file, loaded via `launchctl`, points to `.pruneops.zsh` ensuring that every time your Mac boots up, Prune checks the `apps` file and cleans up your Launchpad accordingly.\n\nBesides the automatic cleanup, you can also invoke Prune manually whenever needed. By typing `prune` in the terminal, you initiate the script. Upon entering your password, Prune swings into action, clearing away the unwanted apps from the Launchpad as specified in the `apps` file.\n\n\u003cbr\u003e\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/nicolodiamante/prune/assets/48920263/ce8fee13-f07f-4ade-987c-20dfe07d6a62\" draggable=\"false\" ondragstart=\"return false;\" alt=\"Prune Terminal\" title=\"Prune Terminal\" /\u003e\n    \u003cimg src=\"https://github.com/nicolodiamante/prune/assets/48920263/e75ead0a-cfae-46ce-af7e-0b3143f9eb9b\" draggable=\"false\" ondragstart=\"return false; \"alt=\"Prune Terminal\" title=\"Prune Terminal\" width=\"750px\" /\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\u003cbr\u003e\u003cbr\u003e\n\nThis blend of automated and manual operation, fueled by a simple configuration, makes Prune a powerful tool for maintaining a clutter-free, organised Launchpad, whether you're at the helm or letting it run on autopilot.\u003cbr\u003e\u003cbr\u003e\n\n### How to Reset Launchpad Layout\n\nIn case you wish to restore the Launchpad to its original state, erasing the customisations made by Prune, a simple command is built into the script for this purpose. By invoking `prune --default` or `prune -d` in the terminal, the Launchpad will revert to its default layout, including all apps and their original organisation. This action utilises a native macOS command to reset the Launchpad, ensuring a safe and straightforward return to the default setup. It's a quick way to undo Prune's changes, should you ever want to start afresh with your Launchpad organisation\u003cbr\u003e\u003cbr\u003e\n\n### Loading and Unloading Prune Agent\n\nPrune's functionality is driven by a background agent that automates the cleaning of your Launchpad based on the preferences you've set. There might be instances where you'd want to stop the agent temporarily or start it after it has been stopped. Prune provides simple commands for these actions:\n\nTo load the Prune agent:\n\n```shell\nprune -l\n```\n\nTo unload the Prune agent:\n\n```shell\nprune -u\n```\n\nThese commands allow you to control the Prune agent's activity on your system.\n\n### Verifying Prune Agent Status\n\nAfter loading or unloading the Prune agent, it's good practice to check its status to ensure it's operating as intended:\n\n```shell\nprune -c\n```\n\nA successful check should return the following output, indicating that the Prune agent is active and loaded:\n\n\u003cbr\u003e\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/nicolodiamante/prune/assets/48920263/11cf711d-5c80-4f27-9c40-ca4c6e9beede\" draggable=\"false\" ondragstart=\"return false;\" alt=\"Prune checking Agent\" title=\"Prune checking Agent\" /\u003e\n    \u003cimg src=\"https://github.com/nicolodiamante/prune/assets/48920263/34c758f0-825e-40d6-8062-df9bf46ca742\" draggable=\"false\" ondragstart=\"return false; \"alt=\"Prune checking Agent\" title=\"Prune checking Agent\" width=\"750px\" /\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\u003cbr\u003e\u003cbr\u003e\n\nIf the Prune agent is not loaded, there will be no output.\n\nThis verification step assures that Prune is set up correctly and ready to keep your Launchpad organised. It's a handy tool for troubleshooting and confirming the agent's operational status.\u003cbr\u003e\u003cbr\u003e\n\n### Removing a Specific App from the Launchpad\n\nPrune now offers the ability to remove a specific app from your Launchpad. This feature is useful when you want to declutter your Launchpad by removing individual apps without affecting others.\n\nTo remove a specific app:\n\n```shell\nprune -r [AppName]\n```\n\nReplace `[AppName]` with the exact name of the app you wish to remove from the Launchpad.\n\nFor example, to remove an app named `\"QuickTime Player\"`, you would use:\n\n```shell\nprune -r \"QuickTime Player\"\n```\n\nThis command will instruct Prune to specifically remove the `\"QuickTime Player\"` from your Launchpad.\n\n**Note:** Be sure to use the exact name of the app as it appears in your Launchpad. The removal is case-sensitive and requires the full app name.\u003cbr\u003e\u003cbr\u003e\n\n### Accessing Help\n\nPrune comes with a built-in help option to provide quick access to its usage instructions right from the terminal. Whether you're unsure about how to reset the Launchpad layout or need a reminder about how to launch Prune, the help option is there to assist you. To access this, simply type `prune --help` or `prune -h` in the terminal. This will display a summary of available options and how to use them.\n\u003cbr\u003e\u003cbr\u003e\n\n## What's new in Prune\n\n### v1.1\n\nRelease Highlights:\n\n- Dynamic Database Path Detection: The script now dynamically finds the correct com.apple.dock.launchpad database path for the current user. This enhancement ensures that the script works seamlessly on systems with multiple users, addressing the issue where the incorrect path might be selected.\n\n\u003cbr\u003e\u003cbr\u003e\n\n## Notes\n\n### Restoring App Icons to Launchpad\n\nIf you wish to re-add an application icon to the Launchpad after it has been removed by Prune, you'll need to manually add it back. This can be done easily by finding the application in your Applications folder, and then dragging and dropping the application icon onto the Launchpad icon in your Dock. Remember, Prune is here to help keep your Launchpad tidy by automating the removal of specified apps, but re-adding apps to the Launchpad is a manual process.\n\n\u003cbr\u003e\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003cimg src=\"https://github.com/nicolodiamante/prune/assets/48920263/5643b393-15a8-4f1c-aa3c-61162a6237be\" draggable=\"false\" ondragstart=\"return false; \"alt=\"Add apps to Launchpad\" title=\"Add apps to Launchpad\" width=\"700px\" /\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n### Resources\n\n- [Launchpad User Guide][apple-guide]\n\n### Contribution\n\nAny suggestions or feedback you may have for improvement are welcome. If you encounter any issues or bugs, please report them to the [issues page][issues].\n\u003cbr\u003e\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003cimg src=\"https://github.com/nicolodiamante/prune/assets/48920263/71f05fea-d2e9-45b0-9af4-e8cfbb5bb9dd\" draggable=\"false\" ondragstart=\"return false;\" /\u003e\u003c/\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://nicolodiamante.com\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://github.com/nicolodiamante/prune/assets/48920263/5deb9f27-b6ed-474b-8095-bc221cee1ea0\" draggable=\"false\" ondragstart=\"return false;\" alt=\"Nicol\u0026#242; Diamante Portfolio\" title=\"Nicol\u0026#242; Diamante\" width=\"17px\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/nicolodiamante/prune/assets/48920263/4f83278b-5eee-466e-8395-8193cee8397b\" draggable=\"false\" ondragstart=\"return false;\" alt=\"MIT License\" title=\"MIT License\" /\u003e\n    \u003cimg src=\"https://github.com/nicolodiamante/prune/assets/48920263/372ab778-d7dd-46ef-a91d-a9a619bc1145\" draggable=\"false\" ondragstart=\"return false; \"alt=\"MIT License\" title=\"MIT License\" width=\"95px\" /\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n\u003c!-- Link labels: --\u003e\n\n[apple-launchpad]: https://support.apple.com/en-gb/guide/mac-help/mh35840/mac\n[apple-guide]: https://support.apple.com/en-gb/guide/mac-help/mh35840/mac\n[issues]: https://github.com/nicolodiamante/prune/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolodiamante%2Fprune","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicolodiamante%2Fprune","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolodiamante%2Fprune/lists"}