Skip to content

Commit

Permalink
Use "legit" macos startup items instead of lovely launchd.
Browse files Browse the repository at this point in the history
  • Loading branch information
kieran-ohara committed Oct 24, 2024
1 parent 649aee9 commit 675d1b5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 0 additions & 2 deletions local/share/scripts/on-login
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/bin/sh -e
ssh-add -q "${HOME}"/.ssh/keys/personal/git-signing-key
open /Applications/Amethyst.app
open /Applications/Maccy.app
echo 'on-login finished'
1 change: 1 addition & 0 deletions os/macos/install.conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@
- [/opt/homebrew/bin/mise install]
- [launchctl load ~/Library/LaunchAgents/me.kieranbamforth.on-login.plist]
- [./os/macos/preferences.sh]
- [./os/macos/startup-items.sh]
14 changes: 14 additions & 0 deletions os/macos/startup-items.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

add_to_login_items() {
local app_path="$1"
osascript <<EOF
tell application "System Events"
make login item at end with properties {path:"$app_path", hidden:false}
end tell
EOF
}

add_to_login_items "/Applications/Amethyst.app"
add_to_login_items "/Applications/Maccy.app"
add_to_login_items "/Applications/OrbStack.app"

0 comments on commit 675d1b5

Please sign in to comment.