I have added a new widget in my btt with a script to activate dark mode and update the widgets appearance.
tell application "System Events"
tell appearance preferences
get properties
if dark mode is false then
return "OFF"
else
return "ON"
end if
end tell
end tell
I want to do the same with nightshift. The toggle button works fine but I cannot update the button because I have not found how to get the "nightshift-state"
unfortunately the nightshift switch in the macOS sidebar is not updated by the toggle-button of btt (the dnd switch is directly updated with this:
tell application "BetterTouchTool"
return get_number_variable "SystemDoNotDisturbState"
end tell
Any ideas?
Would be very happy if you could help
thanks and br
Paolo
@yuuiko recently pointed out that I forgot to document this variable: BTTInternalNightShiftState (should already work since quite a while). However it does only reflect the BTT internal night shift state, which is not necessarily in sync with the system Night Shift. So it only works if you use the BTT night shift actions.
Is there a way macOS can notify BTT of changes? A subscribe mechanism?
Issue I run into is the following:
When macOS triggers Night Shift due to the set schedule, and when I want to manually disable it (want to present in a Webex meeting, and don't like yellow colored desktop for all my participants), I have to use the shortcut twice. The first one will fail.
I have the same issue where I have to use the BTT touch bar night shift button twice to get it to turn on. It also turns night shift off after a while, and I have to press the button again.
EDIT: It also turns on/off in rapid succession sometimes, starting without even having touched the BTT night shift button for hours. Really weird.