A much-needed eject menu for your Mac menu bar. Allows ejecting individual or all non-internal disks. Ejection can also be triggered on sleep, on lid close, or using a hotkey. Using the Command key modifier causes the menu to open the given volume in the Finder instead of ejecting it.
Download: https://github.com/Hammerspoon/Spoons/raw/master/Spoons/EjectMenu.spoon.zip
Signature | EjectMenu.eject_on_lid_close |
---|---|
Type | Variable |
Description | Boolean, whether to eject volumes when the laptop lid is closed with an external display connected. |
Notes |
|
Source | Source/EjectMenu.spoon/init.lua line 50 |
Signature | EjectMenu.eject_on_sleep |
---|---|
Type | Variable |
Description | Boolean, whether to eject volumes before the system goes to sleep. Default value: true |
Source | Source/EjectMenu.spoon/init.lua line 45 |
Signature | EjectMenu.logger |
---|---|
Type | Variable |
Description | Logger object used within the Spoon. Can be accessed to set the default log level for the messages coming from the Spoon. |
Source | Source/EjectMenu.spoon/init.lua line 30 |
Signature | EjectMenu.never_eject |
---|---|
Type | Variable |
Description | List containing volume paths that should never be ejected. Default value: empty list |
Source | Source/EjectMenu.spoon/init.lua line 35 |
Signature | EjectMenu.notify |
---|---|
Type | Variable |
Description | Boolean, whether to produce a notification about the volumes that get ejected. Default value: |
Source | Source/EjectMenu.spoon/init.lua line 40 |
Signature | EjectMenu.other_eject_events |
---|---|
Type | Variable |
Description | List of additional system events on which the volumes should be ejected. |
Notes |
|
Source | Source/EjectMenu.spoon/init.lua line 64 |
Signature | EjectMenu:bindHotkeys(mapping, ejectAll) |
---|---|
Type | Method |
Description | Binds hotkeys for EjectMenu |
Parameters |
|
Returns | |
Source | Source/EjectMenu.spoon/init.lua line 217 |
Signature | EjectMenu:ejectVolumes() |
---|---|
Type | Method |
Description | Eject all volumes |
Parameters |
|
Returns | |
Source | Source/EjectMenu.spoon/init.lua line 125 |
Signature | EjectMenu:shouldEject(path, info) |
---|---|
Type | Method |
Description | Determine if a volume should be ejected. |
Parameters |
|
Returns |
|
Source | Source/EjectMenu.spoon/init.lua line 72 |
Signature | EjectMenu:start() |
---|---|
Type | Method |
Description | Start the watchers for power events and screen changes, to trigger volume ejection. |
Parameters |
|
Returns | |
Source | Source/EjectMenu.spoon/init.lua line 243 |
Signature | EjectMenu:stop() |
---|---|
Type | Method |
Description | Stop the watchers |
Parameters |
|
Returns | |
Source | Source/EjectMenu.spoon/init.lua line 285 |
Signature | EjectMenu:volumesToEject() |
---|---|
Type | Method |
Description | Return table of volumes to be ejected when "Eject All" is invoked. |
Parameters |
|
Returns |
|
Source | Source/EjectMenu.spoon/init.lua line 87 |