Commit Graph
468 Commits
Author SHA1 Message Date
Jon Lund Steffensen d32314f8cc quartz: Add preserve option to Quartz method
This change adds the preserve option to the quartz method which makes it
base the temperature adjustments on the existing gamma ramps when set. This
requires that the existing gamma ramps are saved at start-up which this
commit also adds.

One drawback is that the list of displays is enumerated at start-up now which
means that Redshift will likely not affect displays that are connected after
start-up. This could be fixed in the future by listening to reconfiguration
events.
2015-01-04 16:34:33 -05:00
Jon Lund Steffensen 77e2c3b88b randr: Add preserve option to RandR method 2015-01-04 16:34:33 -05:00
Jon Lund Steffensen 9b299132ef colorramp: Use supplied gamma ramps as initial value
This changes colorramp_fill() to base the ramp calculations on the
existing values in the supplied tables, instead of basing it on a pure
`i/size` value computed on the fly.

All gamma adjustment methods are changed to explicitly initialize the ramps
to the `i/size` value before calls to colorramp_fill().
2015-01-04 16:34:33 -05:00
Jon Lund Steffensen 017fc230be redshift: Add gamma_is_valid function to check gamma
This checks whether the gamma values are within the bounds of
MIN_GAMMA and MAX_GAMMA.
2015-01-04 16:32:47 -05:00
Jon Lund Steffensen bb61a25e88 redshift: Add transition scheme type with color settings
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.
2015-01-04 16:32:47 -05:00
Jon Lund Steffensen c2f0ca4647 redshift: Make transition levels parameter to related functions
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.
2015-01-04 16:32:47 -05:00
Jon Lund Steffensen f9c2a1568c redshift: Move continual loop mode to separate function 2015-01-04 16:32:47 -05:00
Jon Lund Steffensen 799b08214d Add location_t type with lat/lon fields 2015-01-04 16:32:47 -05:00
Jon Lund Steffensen 0510031b69 Merge changes from 1.10 release branch 2015-01-04 15:49:24 -05:00
Jon Lund Steffensen 849c413066 NEWS: Fix date for 1.10 release 2015-01-04 15:49:05 -05:00
Jon Lund Steffensen 39caf9125b contrib: Update Fedora spec for 1.10 2015-01-04 15:39:43 -05:00
Jon Lund Steffensen 9f4c061771 Import translations from launchpad 2015-01-04 15:22:14 -05:00
Jon Lund Steffensen 0cc785c730 redshift: Add noop pause() macro on windows platform
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.
2015-01-04 14:53:16 -05:00
Jon Lund Steffensen b0587faf70 NEWS: Update for 1.10 release 2015-01-04 14:53:16 -05:00
Jon Lund Steffensen f1ce3e0db0 NEWS: Rename to NEWS.md and markdown format 2015-01-04 14:53:16 -05:00
Jon Lund Steffensen 8a63df181a configure.ac: Update version to 1.10 2015-01-04 14:53:16 -05:00
Jon Lund Steffensen bd086885a5 Fix #152: redshift: Loop in reset/manual/one-shot mode with Quartz
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.
2015-01-04 13:50:53 -05:00
Jon Lund Steffensen f7dd7addd8 Fix #153: geoclue2: Set desktop id on GeoClue2 client
This property needs to be set in the latest versions of GeoClue2,
but it is not available in early versions.
2015-01-02 22:42:16 -05:00
Jon Lund Steffensen ae84197292 Update po files 2014-12-30 22:10:36 -05:00
Jon Lund Steffensen 542254705b redshift: Fix untranslated status strings 2014-12-30 22:08:06 -05:00
Jon Lund Steffensen 59023d86f4 Merge branch 'hooks-dir' 2014-12-28 19:26:29 -05:00
Jon Lund Steffensen 24a132bbe8 README: Add flattr button at the end 2014-12-28 19:21:05 -05:00
Jon Lund Steffensen 75ad3de1fe redshift.1: Add description of hooks in man page 2014-12-28 15:20:17 -05:00
Jon Lund Steffensen 268f89088c redshift.1: Update outdated information in man page
Clarify use of options and `list` for for methods and providers.
Add missing information on configuration file options.
Update issue tracker web address.
2014-12-28 15:19:32 -05:00
Jon Lund Steffensen 956dbdfe7e Merge branch 'translation-updates' 2014-12-28 14:42:08 -05:00
Jon Lund Steffensen 06624adc18 Update po files 2014-12-28 14:41:34 -05:00
Jon Lund Steffensen f154aaa7c1 redshift: Add translation comment on period name None 2014-12-28 14:34:43 -05:00
Jon Lund Steffensen 0b94ec26fe redshift: Add translation of Daytime/Night in new gamma string 2014-12-28 14:34:21 -05:00
Jon Lund Steffensen d281e0c1ed redshift: Add translation comment to N,S,W,E strings 2014-12-28 14:33:11 -05:00
Jon Lund Steffensen 501d308495 location: Make translated string about recheck shared between all providers 2014-12-28 14:14:28 -05:00
Jon Lund Steffensen 7cb1af0773 corelocation: Fix missing space character in string 2014-12-28 14:13:42 -05:00
Jon Lund Steffensen ba422bd78e systemtime: Add function wrapping platform sleep function
Adds systemtime_msleep() which sleeps for a number of milliseconds.
This wraps Sleep() on windows and usleep() on other platforms.
2014-12-28 13:13:21 -05:00
Jon Lund Steffensen 4adf25952f systemtime: Fix includes and check for _POSIX_TIMERS
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.
2014-12-28 13:10:31 -05:00
Jon Lund Steffensen fc9a0cb59d contrib: Add appdata file to RPM package 2014-12-28 01:46:15 -05:00
Jon Lund Steffensen 159754c1cd redshift: Add hooks for user actions on period switch
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".
2014-12-28 01:36:26 -05:00
Jon Lund Steffensen 4a572e85e9 redshift: Move period_t to header 2014-12-28 01:30:35 -05:00
Jon Lund Steffensen d58de55645 redshift: Add enum member for unknown period_t (PERIOD_NONE) 2014-12-28 01:25:10 -05:00
Jon Lund Steffensen 4e7717cf14 redshift: Properly handle errors in sigaction 2014-12-28 01:23:30 -05:00
Jon Lund Steffensen cfe90ccf70 redshift: Fix translation of period names
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.
2014-12-27 23:12:47 -05:00
Jon Lund Steffensen e781575643 Merge branch 'less-verbose' 2014-12-27 21:29:27 -05:00
Jon Lund Steffensen 396ecd69a8 redshift: Only print period information when it changes
This change adds functions to determine what the current period is
so we can keep track and only print the period when it changes.
2014-12-27 21:27:36 -05:00
Jon Lund Steffensen 431780b851 redshift: Be less verbose when color values did not change
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.
2014-12-27 21:26:37 -05:00
Jon Lund Steffensen 6ecbfe324f redshift: Change duration of sleep to macro 2014-12-27 20:46:59 -05:00
Jon Lund Steffensen 87cec6b366 Merge branch 'color-settings-struct' 2014-12-27 20:35:00 -05:00
Jon Lund Steffensen ec5aa19acf redshift: Simplify set_temperature by passing color_setting_t
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.
2014-12-27 20:22:11 -05:00
Jon Lund Steffensen a4052e2a7b redshift: Add config setting to set gamma separately for day/night
These settings are gamma-day and gamma-night. The setting gamma
will still override both the daytime and nighttime gamma setting.
2014-12-27 19:43:05 -05:00
Jon Lund Steffensen 4ac4d9ee2d redshift: Move color settings into struct for period
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.
2014-12-27 19:43:05 -05:00
Jon Lund Steffensen c00bcff953 redshift: Use double for interpolation function 2014-12-27 19:30:16 -05:00
Jon Lund Steffensen 46fa3566de redshift-gtk: Split status icon into controller and interface
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.
2014-12-21 20:41:59 -05:00
Jon Lund Steffensen fee0a87a54 redshift-gtk: Add docstrings in statusicon module 2014-12-18 22:03:20 -05:00