Gammastep: Difference between revisions

Phobos (talk | contribs)
Phobos (talk | contribs)
m Updated Gammastep Page
Line 1: Line 1:
[https://gitlab.com/chinstrap/gammastep Gammastep] is a program that adjusts the color temperature of your screen according to your surroundings. By reducing the amount of blue light emitted it may help to reduce strain on the eyes if working in front of the screen at night.
[https://gitlab.com/chinstrap/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 ==
== Installation ==


Using [[Home Manager]] Gammastep can be enabled for a specific user with the following syntax
You can install Gammastep in your global configuration like so:
 
{{File|3=environment.systemPackages = [
  pkgs.gammastep
];|name=/etc/nixos/configuration.nix|lang=nix}}
 
== Home Manager Configuration ==
 
=== Example Usage ===
You can find more options in [https://nix-community.github.io/home-manager/options.xhtml#opt-services.gammastep.enable 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  <code>settings</code> may be found on the Gammastep man page [https://man.archlinux.org/man/extra/gammastep/gammastep.1.en (Gammastep Arch Man Page)].
{{File|3=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;
    };
  };
 
};|name=/etc/nixos/home.nix|lang=nix}}
 
=== 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 [https://gitlab.freedesktop.org/geoclue/geoclue/-/wikis/home Geoclue] and manually set coordinates.
 
==== Geoclue: ====
Geoclue provides location using GPS, 3G modems, GeoIP, and WiFi Geolocation. Some integrations may require additional setup.{{File|3=services.gammastep = {
  enable = true;
  provider = "geoclue2";
};|name=/etc/nixos/home.nix|lang=nix}}
You will also need to enable Geoclue in your global configuration [[Geoclue|(See options on the Geoclue page)]].
{{File|3=services.geoclue2.enable = true;
location.provider = "geoclue2";|name=/etc/nixos/home.nix|lang=nix}}


<syntaxhighlight lang="nix">
==== Coordinates: ====
services.gammastep = {
{{File|3=services.gammastep = {
   enable = true;
   enable = true;
  # Coordinates based location
   provider = "manual";
   provider = "manual";
  latitude = 49.0;
  longitude = 8.4;
};


</syntaxhighlight>
  latitude = "27.9";
  longitude = "86.9";


To properly work, Gammastep needs your location to know when the sun will be setting and it gets dark outside, so that it can automatically adjust your screen temperature accordingly. Replace <code>myUser</code> with your user name running the graphical session and <code>latitude</code> and <code>longitude</code> with your geographical position.
};|name=/etc/nixos/home.nix|lang=nix}}
Instead of declaring your coordinates in Gammastep, you may also choose to declare them globally for your device in your global configuration:
{{File|3=location = {
  provider = "manual";
  latitude = "27.9";
  longitude = "86.9";
};|name=/etc/nixos/configuration.nix|lang=nix}}


== See also ==
== See also ==
* [[Redshift]], alternative implementation supporting X-server compositors
* [[Redshift]], original implementation only supporting X11 (unmaintained).


[[Category:Applications]]
[[Category:Applications]]