Skip to content

Commit

Permalink
MacOS build/startup instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
haimgel committed Aug 3, 2020
1 parent f374be3 commit 93987a9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
12 changes: 12 additions & 0 deletions MacOS/dev.haim.display-switch.daemon.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>dev.haim.display-switch.daemon</string>
<key>Program</key>
<string>/usr/local/bin/display_switch</string>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ On WindowS: the log file is written to `/Users/USERNAME/AppData/Local/display-sw

### MacOS

TODO
[Install Xcode](https://developer.apple.com/xcode/), then do
`xcodebuild -scheme display_switch -configuration release -derivedDataPath .build build` from inside MacOS directory.

## Running on startup

Expand All @@ -56,4 +57,9 @@ Windows user name).

### MacOS

TODO
```bash
# Get your INI file in order! (see above)
cp .build/Build/Products/Release/display_switch /usr/local/bin
cp dev.haim.display-switch.daemon.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/dev.haim.display-switch.daemon.plist
```

0 comments on commit 93987a9

Please # to comment.