Gammastep
Gammastep is an open-source software that adjusts the color temperature of screens based on the time of day.
It does this by gradually shifting the color temperature of the display to reduce the amount of blue light towards the dusk, and increasing the amount of blue light towards dawn.
Users may choose to have screen temperature automatically match their lighting based on geographic location, or based on manually set time-frames. Users may also customize day and night color temperatures, adjust the speed of transitions, and more.
Alternatively you may also consider wlsunset, which is a lightweight modern alternative.
Installation
You can install Gammastep in your global configuration like so:
environment.systemPackages = [
pkgs.gammastep
];
Home Manager Configuration
Example Usage
You can find more options in Home Manager: services.gammastep. This configuration defines the temperature the display will use at night and day, the schedule and length of the transition, and whether it will use a tray icon. Available options for settings may be found on the Gammastep man page (Gammastep Arch Man Page).
services.gammastep = {
enable = true;
# Schedule and set time range for dusk/dawn
duskTime = "18:35-20:15";
dawnTime = "6:00-7:45";
# Temperature to use at night/day (between 1000 and 25000 Kelvin).
temperature = {
day = 5500;
night = 3700;
};
# Tray Icon
tray = true;
enableVerboseLogging = true;
settings = {
general = {
adjustment-method = "randr";
};
randr = {
screen = 0;
};
};
};
Location Based Transitions
You can choose to use Gammastep with location based screen temperature to match when the sun actually sets and rises in your area. Below are examples of those options using Geoclue and manually set coordinates.
Geoclue
Geoclue provides location using GPS, 3G modems, GeoIP, and WiFi Geolocation. Some integrations may require additional setup.
services.gammastep = {
enable = true;
provider = "geoclue2";
};
You will also need to enable Geoclue in your global configuration (See options on the Geoclue page).
services.geoclue2.enable = true;
location.provider = "geoclue2";
Coordinates
services.gammastep = {
enable = true;
# Coordinates based location
provider = "manual";
latitude = "27.9";
longitude = "86.9";
};
Instead of declaring your coordinates in Gammastep, you may also choose to declare them globally for your device in your global configuration:
location = {
provider = "manual";
latitude = "27.9";
longitude = "86.9";
};
See also
- Redshift, original implementation only supporting X11 (unmaintained).