Below is an example on how to install the dockerize
script:
- Make a local clone of this repository in
~/scripts
- Copy
com.jobs.dockerize.plist
inside/Library/LaunchAgents
- Open a terminal window and run
launchctl load /Library/LaunchAgents/com.jobs.dockerize.plist
- Open
System Preferences → Security & Privacy
and navigate to thePrivacy
tab - Click the “Lock” icon and enter your system password to unlock the panel settings
- Click on
Full Disk Access
and add thedockerize
executable to the list - Click on
Accessibility
and add thedockerize
executable to the list
NOTE: These scripts are written to work with personal settings (For example, I take for granted that my home folder is located in /Users/Jobs
).
Script used to automate some tasks relative to docking/undocking the system to/from home/work.
This script is a daemon, invoked when a specific USB device is connected/disconnected (In this case, this device is the external keyboard Keyboard -- QuickFire XT).
So, whenever the plugging event happens, the script does the followings:
- If there's my external keyboard connected, changes keyboard layout from US to IT and enables bluetooth
- If there's an active ethernet connection, shuts down wifi
- If there are two connected external monitors, sets a dual wallpaper
And whenever the unplugging event happens, the script does the followings:
- If there isn't my external keyboard connected, changes keyboard layout from IT to US and disables bluetooth
- If there isn't an active ethernet connection, turns on wifi
- If there aren't two connected external monitors, sets a single wallpaper
The wallpapers are defined in the assets
folder. The single monitor wallpaper is named one.jpg
, while the dual monitor wallpapers are named two_left.jpg
and two_right.jpg
.
The script depends on the following libs:
- xkbswitch (https://github.com/myshov/xkbswitch-macosx)
- blueutil (https://github.com/toy/blueutil)
Script used to check if there's an actual active internet connection. This script is a daemon, invoked every 2 seconds.
So, whenever the current internet connection goes down, a notification appears saying Internet connection - Offline.
At that point, when the internet connection comes back up, a notification appears saying Internet connection - Online.
It's as easy as that.
NOTE: This script works by pinging google.com. So, if Google's servers are down, you might receive a wrong notification.