| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
This checks whether the gamma values are within the bounds of
MIN_GAMMA and MAX_GAMMA.
|
|
|
|
|
|
|
| |
This changes the transition_levels_t to transition_scheme_t and
adds two fields day, night of type color_setting_t. This
encapsulates all the information needed to calculate the current
color setting from an elevation.
|
|
|
|
|
|
| |
Moves transition_low and transition_high from globals into a
struct transition_levels_t that is created in main and passed to
the relevant functions.
|
| |
|
| |
|
|
|
|
|
|
| |
Build failed on windows platform since pause() is not available. The
function is not needed on the windows platform so we just define a
noop pause() macro.
|
|
|
|
|
|
|
| |
The gamma adjustments made with the Quartz (OSX) method are tied
to the process so when we exit, the gamma adjustments are reset.
Therefore we need to run a loop that breaks on CTRL-C, after the
gamma adjustments are made.
|
|
|
|
|
| |
This property needs to be set in the latest versions of GeoClue2,
but it is not available in early versions.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Hooks are executable scripts in ~/.config/redshift/hooks/ that
are run when a certain event happens. The first parameter to the
script indicates the event and further parameters may indicate
more details about the event.
The event "period-changed" is indicated when the period changes
("night", "daytime", "transition"). The second parameter is the old
period and the third is the new period. The event is signaled when
Redshift starts up with the old period set to "none".
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Adds systemtime_msleep() which sleeps for a number of milliseconds.
This wraps Sleep() on windows and usleep() on other platforms.
|
|/
|
|
|
|
| |
Fix missing include of windows.h on windows platform. Change check
for _POSIX_TIMERS to check that it is greater than 0. On OS X, the
POSIX timers are not available and _POSIX_TIMERS is -1.
|
| |
|
| |
|
|
|
|
|
|
| |
The static string array period_names contains strings that are printed
but these were not marked for translation. This is fixed now by adding
the _N() macro and calling gettext() when the strings are used.
|
|
|
|
|
| |
This change adds functions to determine what the current period is
so we can keep track and only print the period when it changes.
|
|
|
|
|
|
| |
This keeps a copy of the previous color_setting_t in the loop so
that we can avoid printing the color temperature and brightness if
they did not change.
|
| |
|
|
|
|
|
|
|
|
| |
Changes all set_temperature function in gamma adjustment methods
to take a color_setting_t pointer with the color settings.
Colorramp functions are similarly changed to take a color settings
struct.
|
|
|
|
|
| |
These settings are gamma-day and gamma-night. The setting gamma
will still override both the daytime and nighttime gamma setting.
|
|
|
|
|
|
| |
Move color settings (temperature, gamma and brightness) into a
struct for each period (day, night). Change the interpolation
function to interpolate all values between these structs.
|
| |
|
|
|
|
|
|
| |
This splits the user interface into, RedshiftController, a GObject
subclass that takes care of starting and interacting with the child
process, and RedshiftStatusIcon providing the actual user interface.
|
| |
|
|
|
|
|
|
| |
The termwait method is used to wait until the child process has
quit. Previously this would fail with an exception if the child
has already quit. This is now ignored.
|
| |
|
|
|
|
|
|
|
| |
This dialog is shown whenever the child process exits with a
non-zero status. The error output from stderr of the child
process is buffered in redshift-gtk in case the child exits
unexpectedly.
|
|
|
|
|
| |
Similarly to the Geoclue provider, the CoreLocation provider only
requests the location on startup.
|
| |
|
| |
|
|
|
|
|
|
|
| |
This simply runs a GLib main loop when the location is requested
and tries to get the location from GeoClue2. We need to run a
main loop since the location is not immediately available, instead
it becomes available through a signal.
|
| |
|
|
|
|
| |
This also adds SIGINT to the signals handled by redshift-gtk.
|
|
|
|
|
|
|
|
|
| |
This requires that the stderr (and stdout) are emptied when the
child process exits, otherwise redshift-gtk will exit before the
error output is forwarded. Also, the '-v' parameter is moved to
the beginning of the command line to avoid error output including
this (e.g. `redshift-gtk -l` would complain about the missing
location provided `-v`).
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Mattias Andrée <maandree@operamail.com>
|
| |
|
|
|
|
|
|
|
|
| |
Implemented through config options transition-high and transition-low (there
is no command line switch at this point). Determines at what solar elevation
Redshift will change from night to transition period to day.
Signed-off-by: Mattias Andrée <maandree@operamail.com>
|
|
|
|
| |
Signed-off-by: Mattias Andrée <maandree@operamail.com>
|
| |
|
|\
| |
| |
| |
| | |
Fix check of error value returned.
Geoclue requires DISPLAY to be set, so try DISPLAY=:0 if not already set.
|