Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Night light

Warmer screens in the evening. Mochi sets each output’s gamma itself through wlr-gamma-control-unstable-v1, which Hyprland, Sway and niri have, so no other program runs. Turn off other night lights, like wlsunset, gammastep or hyprsunset: a compositor gives one program each output’s gamma, and Mochi says so when it can’t have it. When mochid stops, even by crashing, the screens go back to normal.

It turns on by hand, from the control center’s tile or mochi ipc nightlight toggle, or on a schedule: between two times of day, or from sunset to sunrise where you are, worked out from your latitude and longitude. A schedule warms up and cools down over fade_minutes. Turning it on or off by hand slides there in under a second, and lasts until the schedule changes next; auto hands it back to the schedule at once.

# Night light: warmer screens in the evening, through the compositor's
# gamma control. Turn off other night lights, like wlsunset or hyprsunset.
[module.nightlight]
# How warm, in kelvin, from 1000 to 6000. Daylight is 6500.
# temperature = 4000
# When it turns on by itself: Manual only by hand, Times between the start
# and the end below, or Sun from sunset to sunrise where you are.
# schedule = "manual"
# When night starts, with the times schedule.
# start = "20:00"
# When night ends, with the times schedule.
# end = "07:00"
# Where you are, for the Sun schedule: north and east are positive.
# latitude = 0.0
# longitude = 0.0
# How long a schedule takes to warm up or cool down, in minutes.
# fade_minutes = 30

For sunset to sunrise in Paris:

[module.nightlight]
schedule = "sun"
latitude = 48.85
longitude = 2.35
ActionWhat it does
on, off, toggleWarm or daylight until the schedule changes next
autoFollows the schedule again
temperature <kelvin>The night’s temperature until mochid restarts, from 1000 to 6000
statusPrints whether it’s on, how warm, and any problem