Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ojford/loginitems
Simple utility for managing macOS login items from the command line
https://github.com/ojford/loginitems
dotfiles initscript login-automation macos macos-setup
Last synced: 8 days ago
JSON representation
Simple utility for managing macOS login items from the command line
- Host: GitHub
- URL: https://github.com/ojford/loginitems
- Owner: OJFord
- License: mit
- Created: 2015-12-23T15:43:43.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-11-22T11:18:37.000Z (almost 4 years ago)
- Last Synced: 2024-05-02T05:13:41.347Z (6 months ago)
- Topics: dotfiles, initscript, login-automation, macos, macos-setup
- Language: Shell
- Homepage:
- Size: 5.86 KB
- Stars: 71
- Watchers: 4
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# loginitems
loginitems is a simple command line tool to manage applications that launch on startup on OS X. While [previously possible with launchctl]() this is deprecated as of some time before or with 10.11.## Installation
I'm a big brew fan - so while this repo isn't popular enough to be included in official formulae, if you share my preference then you can run [the formula from my fork here](https://github.com/OJFord/homebrew/blob/formula-loginitems/Library/Formula/loginitems.rb):
```sh
brew tap OJFord/formulae
brew install loginitems
```Otherwise, you'll need to clone/download the repo to somewhere on your path, and `chmod +x` each of the included scripts.
## Usage
```sh
Usage: loginitems [-h | -a NAME [-p PATH] [-s HIDE?] | -d NAME | -l]
-h Show this help message.
-a Add an application, optionally hide with -s false.
-p Path to application; defaults to /Applications/NAME.app.
-s Show/hide application; defaults to true (no hide).
-d Delete an application from login items.
-l List all login items (default if no option specified).
```For example:
```sh
% loginitems -a Caffeine
% loginitems -l
Caffeine
% loginitems -d Caffeine
% loginitems -l
% loginitems -a "Custom Name" -p "/Applications/Caffeine.app"
% loginitems -a "App" -p "/that/I/decided/to/store/elsewhere/because/yolo.not-app"
% loginitems -l
Custom Name, App
%
```## Todo
- While the Applescript use may well work (untested) on earlier versions, I hope to check OS X version and use `launchctl submit` on older versions, or `defaults write` on ancient ones