-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Valtteri Palonkorpi
committed
Dec 11, 2022
0 parents
commit 08c831f
Showing
4 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dist | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Copyright 2022 Valtteri Palonkorpi | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Sidecar Connect | ||
|
||
Connect your iPad as an external monitor to your Mac automatically. Should work in Headless mode as well, with an HDMI Headless dongle. | ||
|
||
I created this little script in order to use my Mac Mini on the go, with my iPad Pro as its monitor. I haven't been able to test it without an external monitor yet. | ||
|
||
## Prerequisites | ||
|
||
The script currently only works in macOS Ventura. When ran for the first time, the script requests permissions for Accessibility features. | ||
|
||
## Installation | ||
|
||
You can get started by simply downloading the script from the "Packages" section. | ||
|
||
To get the script to run automatically, open your `System Settings`, under `General` click `Login Items` and add the script to the `Open at Login` list. | ||
|
||
## Known issues | ||
|
||
- If you're setting this up to have a Mac Mini running in headless mode with an iPad as a primary display, you should note that the script only runs after login. You would probably need to either login blindly, or then set up the script to run on a user that has automatic login enabled. | ||
- The app is very likely to break with major macOS updates. I will attempt to distribute a new version whenever the script does break. | ||
|
||
## Contributing | ||
|
||
Feel free to contribute to the script with issues and PR's. I'll make sure to check them out! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
tell application "System Settings" | ||
activate | ||
delay 1 | ||
end tell | ||
tell application "System Events" | ||
tell application process "System Settings" | ||
tell splitter group 1 of group 1 of window 1 | ||
tell group 1 | ||
tell scroll area 1 | ||
tell outline 1 | ||
select row 21 | ||
end tell | ||
end tell | ||
end tell | ||
tell group 2 | ||
tell pop up button 1 of group 1 | ||
delay 1 | ||
click | ||
delay 0.2 | ||
click last menu item of menu 1 | ||
end tell | ||
end tell | ||
end tell | ||
end tell | ||
end tell | ||
tell application "System Settings" | ||
quit | ||
end tell |