✏️ Describe the feature
mli load takes a long time if there are many Login Items in login_items.json because Add() just loops the Login Items array ([]*loginItem).
So it should load parallelly to speed up.
|
func (loginItems *LoginItems) Add() error { |
|
for _, loginItem := range *loginItems { |
|
if isExist, err := isExist(loginItem.Path); !isExist && err == nil { |
|
fmt.Printf("⚠️ not found: \"%s\"\n", loginItem.Path) |
|
continue |
|
} |
|
if _, err := mack.Tell("System Events", fmt.Sprintf(`make login item at end with properties { name: "%s", path: "%s", hidden: %v }`, loginItem.Name, loginItem.Path, loginItem.Hidden)); err != nil { |
|
return err |
|
} |
|
fmt.Printf("🔍 %s\n", loginItem.Name) |
|
} |
|
|
|
return nil |
|
} |
✔︎ Confirm these checks
🗒️ Additional Information
No response
✏️ Describe the feature
mli loadtakes a long time if there are many Login Items inlogin_items.jsonbecauseAdd()just loops the Login Items array ([]*loginItem).So it should load parallelly to speed up.
mli/lib/oascript.go
Lines 46 to 59 in fd914ba
✔︎ Confirm these checks
🗒️ Additional Information
No response