-
Notifications
You must be signed in to change notification settings - Fork 18
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
Unable to 'get', 'show' or 'query' current brightness #11
Comments
@HmACK666 Thanks for the feedback, we appreciate knowing that sharing our tools is useful and beneficial to others in the community. Support for managing brightness is on our future plans. We are currently busy with other projects but will get back to this and other features and get them implemented. |
@uurazzle That's great to hear! I'm happy to assist testing on multiple hardware models if that helps. The current login script I have set for our photography labs sets brightness, colour profile & resolution (for projectors). Script DescriptionRun for all users, except admin at Login########################################################################### SETS CUSTOM COLOUR PROFILES FOR UP TO FOUR DISPLAYSSETS CUSTOM BRIGHTNESSPropertiesset by Parameter Labels in script Optionscomment below each option details the variables that can be used.REQUIREMENTSScript used to assign custom color profiles to displays:PROFILES_TOOL="/Library/Scripts/org/SoA/customdisplayprofiles" Binary used to set custom predefined brightness for displays:BRIGHTNESS_TOOL="/Library/Scripts/org/SoA/brightness" (used simply to mirror & unmirror displays on launch, no interaction: http://www.fabiancanas.com/open-source/mirror-displays/)program used in the GUI also able to be referenced & run from the commandline:MIRROR_TOOL="/Applications/Utilities/MirrorDisplays.app/Contents/MacOS/mirror" VARIABLESPROFILES_DIR=/Library/ColorSync/Profiles/Displays Get the system's UUID to set ByHost prefsif [[ add to log started by main login script:exec >> /var/log/LAB_LoginScript.log 2>&1 DisplayMirror="$4" yes or noecho "mirroring on:" $DisplayMirror MonitorProfile="$5" yes or noecho "display profile enabled:" $MonitorProfile MonitorBrightness="$6" yes or noecho "monitor brightness enabled:" $MonitorBrightness if [ -e /Library/Preferences/nz.ac.org.ProjectorSettings.plist ]; then
else export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin ########################################################################### Script action
Check that the required scripts/binaries existif not trigger a policy to install themif [ ! -e "$PROFILES_TOOL" ] || [ ! -e "$BRIGHTNESS_TOOL" ] || [ ! -e "$MIRROR_TOOL" ]; Change permissions on /Library/ColorSync folderso customer screen and printer profiles can be createdChange request for photography lab - 22 Feb 2006/bin/chmod -R 777 /Library/ColorSync/Profiles ########################################### if [ "$MonitorProfile" = "yes" ]; then Using the customdisplayprofiles script, get details for up to 4 connected displays.Displays reporting as "iMac" are treated as the main display & will have the "print" icc profile applied.Displays reporting as "Panasonic" are treated as projectors & will have the "video" icc profile applied.Any other displays will have an "external" icc profile applied (potential future use).Display descriptions:13" MacBook Pro: 'Color LCD'20" external Cinema Display:iMac dispalys: 'iMac'may need to add extra criteria for the projectors (multiple models/names etc)profiles set by the tool are unset if the Displays preference pane if loaded - maybe try to use the global option to load profiles?check mirroring status of displays, if mirrored un-mirror to apply settingsecho "checking mirroring status" if [ "$MIRROR_STATE" == "on" ]; then
fi ############################################## Brightness settingif [ "$MonitorBrightness" = "yes" ]; then
killall cfprefsd
echo "brightness value:" $BRIGHTNESS_VALUE ######################################### ####check mirroring status of displays if [ "$presentation" == "1" ]; then Check to make sure the library and command-line API are both installedif [[ -e /Library/Python/2.7/site-packages/display_manager_lib.py && read 'global' display settings from JSSif [ "$DisplayMirror" = "yes" ]; then #------------- kill user message####killall jamfHelper kill HUD notification/bin/kill $pid tidy up tmp files to prevent permissions issuesnot required as of May 2019 - to be removedrm -rf /tmp/mirrorrezX Always exit with 0 statusexit 0 |
@HmACK666 Thanks for the details on your environment usage and the example shell/bash script. Again, we are busy with other projects, but will add the features when we have time to focus on this project again. |
First off - awesome tool! I picked up on this while looking to set the 'optimise for:' option (in the Displays System Preference) via script.
More of a feature request - I currently get & set the brightness of displays with other scripts. Is display_manager going to be able to query & report the current brightness of a given display in the future?
The text was updated successfully, but these errors were encountered: