Skip to content

Commit

Permalink
Feature: native control and filters
Browse files Browse the repository at this point in the history
This now uses launchctl under the hood, so it no longer moves the files and should work with everything natively.
Additionally, you can now work on multiples services simultaneously by using filters!
  • Loading branch information
hazcod authored Aug 24, 2020
2 parents ad96d30 + a2c616f commit 0eed3b8
Show file tree
Hide file tree
Showing 2 changed files with 218 additions and 125 deletions.
63 changes: 50 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,56 @@

# maclaunch
List your macOS startup items and their startup policy.

How does it work?
-------------
Lists plist files in LaunchAgents and LaunchDaemons folders.
When disabling an item, it moves it to .disabled so launchctl does not read them anymore.
It does **not** alter the contents in any way. It does not support JSON plists (for now).
Lists and controls your macOS startup items and their startup policy.

Take back control of your macOS system!

```shell
% maclaunch.sh list microsoft
> com.microsoft.update.agent
Type : user
User : hazcod
Launch: disabled
File : /Library/LaunchAgents/com.microsoft.update.agent.plist
> com.microsoft.teams.TeamsUpdaterDaemon
Type : system
User : root
Launch: disabled
File : /Library/LaunchDaemons/com.microsoft.teams.TeamsUpdaterDaemon.plist
> com.microsoft.office.licensingV2.helper
Type : system
User : root
Launch: disabled
File : /Library/LaunchDaemons/com.microsoft.office.licensingV2.helper.plist
> com.microsoft.autoupdate.helper
Type : system
User : root
Launch: disabled
File : /Library/LaunchDaemons/com.microsoft.autoupdate.helper.plist
```

## How does it work?

Lists XML/json/binary plist files in LaunchAgents and LaunchDaemons folders which are loaded by launchctl.
When disabling an item, it uses launchctl to natively stop loading that service.
It does **not** alter the contents in any way or moves the file, so it should work with practically any service.

The name you provide can either be specific to that service or function as a filter to work on multiple services simultaneously.

## Installation

Installation can be done straight from [my Homebrew tap](https://github.com/hazcod/homebrew-hazcod) via `brew install hazcod/homebrew-hazcod/maclaunch` or just copy `maclaunch.sh` to your filesystem.

## Usage

`Usage: maclaunch <list|disable|enable> (filter|system)`

To list all your services: `maclaunch list`

Installation
-------------
Installation can be done straight from [my Homebrew tap](https://github.com/hazcod/homebrew-hazcod): `brew install hazcod/homebrew-hazcod/maclaunch`.
To list all your services including system services: `maclaunch list system`

Usage
-------------
To list all microsoft services: `maclaunch list microsoft`

`Usage: maclaunch <list|disable|enable> (item name|system)`
To enable plex player-helper: `maclaunch enable tv.plex.player-helper`

![Example output](https://i.imgur.com/VhHTJXJ.png)
To disable everything related to plex: `maclaunch disable plex`
Loading

0 comments on commit 0eed3b8

Please sign in to comment.