When I plug in an external monitor when redshift should be disabled, the external monitor often gets its colors shifted anyway. Color in the main screen is ok though. Reloading the configuration from hammerspoon's icon in the menu bar solves the issue.
This is a very frequent issue, but it doesn't happen every time. If I reload the config the problem gets fixed and I'm unable to replicate it for some time by unplug and plugging the monitor. I haven't figured out the pattern for replicating the issue, but it has been happening every day, so might it
Here's my redshift config:
local location = hs.location.get()
local times = {sunrise = "07:00", sunset = "20:00"}
if location then
local tzOffset = tonumber(string.sub(os.date("%z"), 1, -3))
for i, v in pairs({"sunrise", "sunset"}) do
times[v] = os.date("%H:%M", hs.location[v](location.latitude, location.longitude, tzOffset))
end
end
hs.redshift.start(4200, times.sunset, times.sunrise)
logger.i("redshift location", location)
logger.i("redshift from", times.sunset, "to", times.sunrise)
logger.i("redshift started with state", hs.redshift.isDisabled())
local redshift = hs.menubar.new()
if redshift then
function setRedshiftDisplay(disabled)
if disabled then
redshift:setTitle("☀️")
else
redshift:setTitle("🌙")
end
end
function toggleRedshift()
hs.redshift.toggle()
setRedshiftDisplay(hs.redshift.isDisabled())
end
redshift:setClickCallback(toggleRedshift)
setRedshiftDisplay(hs.redshift.isDisabled())
end
When I plug in an external monitor when redshift should be disabled, the external monitor often gets its colors shifted anyway. Color in the main screen is ok though. Reloading the configuration from hammerspoon's icon in the menu bar solves the issue.
This is a very frequent issue, but it doesn't happen every time. If I reload the config the problem gets fixed and I'm unable to replicate it for some time by unplug and plugging the monitor. I haven't figured out the pattern for replicating the issue, but it has been happening every day, so might it
Here's my redshift config: