Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Rich B22

macrumors regular
Original poster
Jul 24, 2019
113
58
Hoping someone can help.

I do photo editing on my Ventura 2017 27" iMac and have calibrated the monitor. Unfortunately, while the calibrated brightness setting is fine for photo editing, it is too dark for normal use and especially for watching videos, so I have to crank up the brightness for those functions. Without having a preset to go back to, I can only roughly approximate the calibrated brightness, since macOS only has a non-quantified slider.

I have found ways to set different login brightness settings for different users, which I prefer not to do and also some apps to dim or brighten the screen, but not return it to it's calibrated setting.

Does anyone have any idea how to accomplish this within a specific user, or at least return to the calibrated setting? Your input is much appreciated.
 
You can set the brightness to a specific level in the Shortcuts app. Should be easy to create a couple of Shortcuts to achieve what you want.
 
Brilliant!!
Being an old-timer, I'm familiar with Automator, but didn't find a way to do this. Haven't used shortcuts, but now that I've taken a look after your suggestion, it seems to be more useful.

In my situation, after calibration, I can use the "Get the" (Current Brightness) shortcut to find what the numerical setting is, and then create a new shortcut "Set brightness to" that number"

Thank you so much!!
 
Although solved, I wanted to share another approach for versions of macOS incompatible with Shortcuts.app (Big Sur and older). A heads-up, it's not too pretty, but it works.
It is limited to the 64 brightness steps macOS offers with option ⌥+Shift ⇧
set.brightness.png


Pt.1: A bash script for the Apple Script to get the current non-linear brightness value. Made executable with chmod +x.
Bash:
#!/bin/bash
brightness=$(ioreg -c AppleBacklightDisplay | grep brightness )
brightness=${brightness%%"},\"ggsc"*}
brightness=${brightness##*",\"value\"="}
echo $brightness
Pt.2: An Apple Script for each desired brightness value. Located in ~/Library/Scripts. Requires the above bash script.
The menu bar icon (shown above) can be enabled via ScriptEditor.app > Settings > Show script menu in menu bar
AppleScript:
-- the value '4707' equals 50% brightness for my MacBook Pro
set target_brightness to 4707
-- adjust path for 'get_brightness.sh'
set script_path to "~/Downloads/get_brightness.sh"
set current_brightness to do shell script script_path as POSIX path
-- uncomment command below to get the current brightness vaule
#display dialog current_brightness
set my_delta to current_brightness - target_brightness
set my_counter to 0
repeat while (my_delta is not 0 and my_counter is less than 64)
    set my_counter to my_counter + 1
    if my_delta is less than 0 then
        tell application "System Events" to key code 113 using {option down, shift down} #increase brightness
    end if
    if my_delta is greater than 0 then
        tell application "System Events" to key code 107 using {option down, shift down} #decrease brightness
    end if
    set current_brightness to do shell script script_path as POSIX path
    set my_delta to current_brightness - target_brightness
end repeat

edit: Any hint on how to get the multi-line bash script directly integrated into the Apple script is highly appreciated.
 
Last edited:
  • Like
Reactions: Nguyen Duc Hieu
I can use the "Get the" (Current Brightness) shortcut

I'm not that familiar with shortcuts. Didn't find a "Get the" shortcut, or "Current Brightness" variable in Ventura 13.4.1. Did find "Set Brightness". ?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.