-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Add Mac network location changer #18961
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Mac network location changer #18961
Conversation
Congratulations on your new Raycast extension! 🚀 You can expect an initial review within five business days. Once the PR is approved and merged, the extension will be available on our Store. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR introduces a new Raycast extension for managing macOS network locations, providing a user-friendly interface to switch between network configurations directly from Raycast.
- CHANGELOG.md entries need to use
{PR_MERGE_DATE}
template string instead of hardcoded dates, and version 1.0.1 should be placed above 1.0.0 - Screenshots should be moved from
/screenshots
to/metadata
folder as per Raycast Documentation - Git clone URL in README.md should be updated to point to the Raycast extensions repository
- Command name
network-location
in package.json should be more descriptive, likechange-network-location
to better reflect its action
💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!
8 file(s) reviewed, 8 comment(s)
Edit PR Review Bot Settings | Greptile
### Added | ||
- Initial release: allow changing Mac network location directly from Raycast | ||
|
||
## [1.0.1] - 2025-05-05 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Move this entry to the top since newer entries should be first in the changelog
## [1.0.1] - 2025-05-05 | |
# macOS Network Location Changer Changelog | |
## [1.0.1] - 2025-05-05 | |
### Added | |
- Updated documentation in preparation for publishing | |
## [1.0.0] - 2025-05-05 | |
### Added | |
- Initial release: allow changing Mac network location directly from Raycast |
@@ -0,0 +1,9 @@ | |||
# macOS Network Location Changer Changelog | |||
|
|||
## [1.0.0] - 2025-05-05 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
syntax: Replace 2025-05-05
with {PR_MERGE_DATE}
to follow the changelog date template format
## [1.0.0] - 2025-05-05 | |
## [1.0.0] - {PR_MERGE_DATE} |
### Added | ||
- Initial release: allow changing Mac network location directly from Raycast | ||
|
||
## [1.0.1] - 2025-05-05 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
syntax: Replace 2025-05-05
with {PR_MERGE_DATE}
to follow the changelog date template format
## [1.0.1] - 2025-05-05 | |
## [1.0.1] - {PR_MERGE_DATE} |
.DS_Store | ||
|
||
.idea/ | ||
**.bkp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: The .bkp pattern uses ** which is redundant here since it's already at the root. Could simplify to *.bkp
### Manual (Development) | ||
|
||
```bash | ||
git clone https://github.com/rfscouto/raycast-mac-network-location-changer.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: The git clone URL should point to the Raycast extensions repository, not a personal repository
git clone https://github.com/rfscouto/raycast-mac-network-location-changer.git | |
git clone https://github.com/raycast/extensions.git |
|
||
| Overview | List of Locations/Switch Confirmation | | ||
|----------------------------------------------------------|------------------------------------------------------------| | ||
|  |  | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Screenshots should be in a 'metadata' folder for store submissions, not 'screenshots'
|  |  | | |
|  |  | |
"subtitle": "Change network location", | ||
"description": "Changes the network location", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Description and subtitle are very similar. Consider making the subtitle more specific about what the command does
const switchLocation = (name: string) => { | ||
exec(`${SCSELECT} "${name}"`, (error) => { | ||
if (error) { | ||
showToast({ style: Toast.Style.Failure, title: "Failed to switch location" }); | ||
} else { | ||
showToast({ style: Toast.Style.Success, title: `Switched to ${name}` }); | ||
fetchLocations(); | ||
} | ||
}); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: switchLocation should be wrapped in try-catch and use showFailureToast from @raycast/utils for error handling
const switchLocation = (name: string) => { | |
exec(`${SCSELECT} "${name}"`, (error) => { | |
if (error) { | |
showToast({ style: Toast.Style.Failure, title: "Failed to switch location" }); | |
} else { | |
showToast({ style: Toast.Style.Success, title: `Switched to ${name}` }); | |
fetchLocations(); | |
} | |
}); | |
}; | |
const switchLocation = (name: string) => { | |
try { | |
exec(`${SCSELECT} "${name}"`, (error) => { | |
if (error) { | |
showFailureToast(error, { title: "Failed to switch location" }); | |
} else { | |
showToast({ style: Toast.Style.Success, title: `Switched to ${name}` }); | |
fetchLocations(); | |
} | |
}); | |
} catch (error) { | |
showFailureToast(error, { title: "Failed to switch location" }); | |
} | |
}; |
Description
Shortcut to list change the Network Location on Mac OS
Screencast
Checklist
npm run build
and tested this distribution build in Raycastassets
folder are used by the extension itselfREADME
are located outside the metadata folder if they were not generated with our metadata tool