-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Reading System Preferences [feature request] #25
Comments
Yeah, could be useful, but there's no "one way" to read the system preferences. What preferences specifically do you need? |
So, I specifically need to display
|
It's not possible to read these from the System Preferences or Here's how we could do this:
|
How do you think this api should look? readSystemPreferences('Accessibility')
readSystemPreferences('FullDiskAccess')
readSystemPreferences('FilesAndFolders', 'Documents')
readSystemPreferences('FilesAndFolders', 'Downloads')
readSystemPreferences('FilesAndFolders', 'Desktop') Just throwing ideas out there. |
@alex-cory They should be separate methods as they all can't behave exactly the same (some might need to be async, for example). const {hasPrivacyPermission} = require('electron-util');
console.log(hasPrivacyPermission.fullDiskAccess());
console.log(hasPrivacyPermission.filesAndFoldersDesktop()); |
I can do my best to help implement this. |
@sindresorhus : Can we open Notifications settings from System Preference directly?
|
@sindresorhus : Please ignore.. i just tried a sample app and it works.. my bad! |
Currently there's
openSystemPreferences
, what if there was areadSystemPreferences
or something similar. That way we could see what system preferences were currently set.The text was updated successfully, but these errors were encountered: