LinuxCommandLibrary

gammastep

Adjust screen color temperature based on time

TLDR

Turn on Gammastep with a specific [t]emperature during the day (e.g. 5700k) and at night (e.g. 3600k)

$ gammastep -t [5700]:[3600]
copy

Turn on Gammastep with a manually specified custom [l]ocation
$ gammastep -l [latitude]:[longitude]
copy

Turn on Gammastep with a specific screen [b]rightness during the day (e.g. 70%) and at night (e.g. 40%), with minimum brightness 10% and maximum brightness 100%
$ gammastep -b [0.7]:[0.4]
copy

Turn on Gammastep with custom [g]amma levels (between 0 and 1)
$ gammastep -g [red]:[green]:[blue]
copy

Turn on Gammastep with a c[O]nstant unchanging color temperature
$ gammastep -O [temperature]
copy

Reset temperature adjustments applied by Gammastep
$ gammastep -x
copy

SYNOPSIS

gammastep [OPTIONS]

PARAMETERS

-l, --location :
    Specify your geographic location (latitude and longitude in decimal degrees). Overrides automatic location detection.

-O, --temperature
    Set a specific color temperature (e.g., 6500K for daylight, 3500K for warmer light). This prevents automatic adjustments.

-o, --one-shot
    Apply the color temperature adjustment once and then exit, rather than running continuously.

-x, --exit
    Exit a running gammastep instance. This will restore the original screen gamma settings.

-p, --print
    Print the current color temperature and brightness settings and then exit.

-r, --restore
    Restore the original gamma ramps (color settings) to their default system values and exit.

-b, --brightness
    Set the screen brightness. Value must be between 0.1 and 1.0. Note: This is a gamma adjustment, not true backlight control.

-g, --gamma ::
    Set specific gamma values for red, green, and blue channels (e.g., 1.0:1.0:1.0 for no change).

-P, --pidfile
    Specify a file to write the process ID (PID) of the running gammastep instance.

-t, --transition
    Set the duration of the color temperature transition between daytime and nighttime in seconds (default is 600 seconds).

-m, --method
    Specify the screen adjustment method (e.g., randr, wayland, drm). Defaults to auto-detection.

-v, --verbose
    Enable verbose output, showing more details about operations.

-V, --version
    Display version information and exit.

-h, --help
    Show the help message and exit.

DESCRIPTION

gammastep is a command-line utility designed to adjust the color temperature of your display according to the time of day and your geographical location. The primary goal is to reduce eye strain, especially during evening and night hours, by shifting the screen's color spectrum towards warmer tones (redder light) as the sun sets, and back to cooler tones (bluer light) during daylight hours.

It functions by determining the sunrise and sunset times for your specified location and then smoothly transitions the display's color temperature between a daytime and a nighttime value. This automatic adjustment helps your eyes adapt to the ambient light conditions, making screen viewing more comfortable and potentially aiding in better sleep by reducing exposure to blue light in the evening. gammastep can run continuously in the background or apply a one-shot adjustment.

CAVEATS

The effectiveness of brightness control (`-b`) depends on the display driver; it adjusts gamma ramps, which might not be true backlight control. Location detection might rely on external services or GeoClue, which may require network access. If multiple instances are run without the `--one-shot` or `--exit` flags, they can conflict.

CONFIGURATION FILE

gammastep can be configured using a configuration file, typically located at $HOME/.config/gammastep/config or $HOME/.gammastep.conf. This file allows users to set default options, including day and night temperatures, location, and transition times, without needing to specify them on the command line every time.

DAEMON MODE

When run without the --one-shot option, gammastep runs as a daemon, continuously monitoring the time and smoothly adjusting the screen's color temperature throughout the day and night. This is the typical way to use gammastep for automatic, persistent adjustments.

HISTORY

gammastep emerged as an alternative to other popular screen color temperature adjustment tools like Redshift and f.lux. Its development aims to provide a robust solution, particularly for Wayland display servers, where Redshift historically faced challenges due to Wayland's design principles. While Redshift primarily targeted X11, gammastep often offers better native Wayland support, leveraging protocols like wlr-output-management to achieve its effects. It maintains similar functionality to its predecessors, focusing on circadian rhythm-based color temperature adjustments for user comfort.

SEE ALSO

redshift(1), xrandr(1), wlr-randr(1)

Copied to clipboard