Hope this helps someone: I have an issue where Cryptomator sometimes dismounts so I wrote an Applescript to warn me via a Pop-up window which I can’t miss if the drive is not mounted.
I run the script automatically every 1 minute using a custom macOS launchd agent like this:
Open Apple’s editior in “/Applications/Utilities/Script Editor.app”
Copy and paste the below script and save it someplace naming it: “cryptomatorMountChecker.scpt”
Remember the path.
# set diskName to the Cryptomator mounted volume (/Volumes/<mountpoint>) you'd like to monitor
set diskName to "_cryptomator"
tell application "System Events" to set diskNames to name of every disk
if diskName is in diskNames then
#display dialog quoted form of diskName & " is already mounted." & return buttons {"OK"} default button 1
else
#do shell script "open /Applications/Cryptomator.app"
display dialog quoted form of diskName & " is no longer mounted!" & return buttons {"OK"} default button 1
end if
Then create a Launchd Agent like so:
cd ~/Library/LaunchAgents/
vi cryptomator.mount.monitor.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>Cryptomator Volume Mount Monitor</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/osascript</string>
<string>/Users/<username>/cryptomatorMountChecker.scpt</string>
</array>
<key>StartInterval</key>
<integer>60</integer>
</dict>
</plist>
Save the file and now from Terminal run:
launchctl load ~/Library/LaunchAgents/cryptomator.mount.monitor.plist
launchctl start cryptomator.mount.monitor
You’re all set. Eject the drive in Cryptomator, wait 1 minute and you should see a pop-up informing you. Mount the drive once more and no popups.
Enjoy.