Skip to content

ConnectMeHub is an open-source project designed exclusively for macOS users, simplifying Wi-Fi network management on this platform. It allows macOS users to seamlessly connect to specified Wi-Fi networks, ensuring a reliable and hassle-free network experience.

License

Notifications You must be signed in to change notification settings

mohamedawnallah/ConnectMeHub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

ConnectMeHub

ConnectMeHub is an open-source project designed exclusively for macOS users, simplifying Wi-Fi network management on this platform. It allows macOS users to seamlessly connect to specified Wi-Fi networks, ensuring a reliable and hassle-free network experience.

Features

  • Automatically connects to a list of preferred Wi-Fi networks.
  • Supports fallback to a backup network if the primary networks are unavailable.
  • Passwords are securely stored in the macOS Keychain for enhanced security.

macOS Compatibility

ConnectMeHub is designed exclusively for macOS users. It takes advantage of macOS-specific features to simplify Wi-Fi network management on this platform.

Please note that this script is not compatible with other operating systems.

Granting Keychain Access

To allow osascript to access the keychain and retrieve stored Wi-Fi passwords, follow these steps:

  1. Open the "Keychain Access" application on your macOS.

  2. Select the "Login" keychain on the left sidebar.

  3. Search for the Keychain (Wi-Fi Name) that contains the Wi-Fi password and Select it.

  4. Select the "Access Control" tab.

  5. Click the "+" button to add an application to the list.

  6. Navigate to /usr/bin/osascript and select it.

  7. Click "Add" to grant osascript access to the keychain items.

Getting Started

To get started with ConnectMeHub on macOS, follow these simple steps:

  1. Clone the repository to your local machine.
git clone https://github.com/mohamedawnallah/ConnectMeHub.git
  1. Open the project in your favorite code editor or script runner.
  2. Customize the network configurations in the script by modifying the mainNetworkSSIDs and backupNetworkSSIDs properties. For example:
-- Example: Customize the list of preferred networks
property mainNetworkSSIDs : {"MyHomeNetwork", "OfficeWiFi", "CafeFreeWiFi"}

-- Example: Set a backup network
property backupNetworkSSIDs : {"BackupNetwork"}

Run the script by executing the main() function.

osascript ConnectMeHub.scpt

Running Periodically with Crontab

You can configure ConnectMeHub to run periodically using the crontab. Here's an example of how to set it up:

  1. Open Terminal on your macOS.
  2. Open your crontab configuration by running:
crontab -e
  1. Add the following line to run ConnectMeHub every minute:
* * * * * osascript path/to/ConnectMeHub.scpt

This schedule runs ConnectMeHub every minute. However, you can customize the cron schedule to match your specific needs. The format for the cron schedule is as follows:

  • The five asterisks (*) represent the minute, hour, day of the month, month, and day of the week fields, respectively.
  • You can adjust the values in these fields to determine when ConnectMeHub runs.
  • Refer to the Crontab documentation for more information on customizing your cron schedule.

After customizing your schedule, save and exit the crontab configuration to apply the changes.

ConnectMeHub will now run according to your specified schedule, automatically managing your Wi-Fi connections at the desired intervals.

Usage

ConnectMeHub simplifies the process of connecting to preferred Wi-Fi networks on macOS. It automatically detects the current network and switches to a specified network if available. If no suitable network is found, it displays a notification.

Contributing

Contributions to ConnectMeHub are welcome! If you have suggestions for improvements, new features, or would like to add support for other operating systems (such as Windows, Ubuntu, etc.), please open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

ConnectMeHub is an open-source project designed exclusively for macOS users, simplifying Wi-Fi network management on this platform. It allows macOS users to seamlessly connect to specified Wi-Fi networks, ensuring a reliable and hassle-free network experience.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published