Skip to content

A simple bash script that opens and closes programs depending on whether my USB-C monitor is connected.

Notifications You must be signed in to change notification settings

fkscott/incipiam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Incipiam

To begin...

Incipiam is a simple bash script that uses launchctl and system_profiler to open and close programs depending on whether my USB-C monitor is connected.

I would like to thank reddit user /u/quantam_libet for the advice and code snippets to get me started.

Setting up launchd

If you'd like to adapt this script to fit your needs, fork this repo and use the launchd_template.plist file to get started.

Once you have a script you'd like to execute, put the modified launchd_template.plist file in $HOME/Library/LaunchAgents and load the new job with $HOME/Library/LaunchAgents/launchd_template.plist

After that, macOS will execute your script at intervals, even after restarts.

About

A simple bash script that opens and closes programs depending on whether my USB-C monitor is connected.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages