Commit Graph
70 Commits
Author SHA1 Message Date
Jon Lund Steffensen 79bfe9eed4 Remove Gnome Clock location provider
This was basically a hack that happened to work because the Gnome Clock
applet could store the current location of the user, and Redshift was able
to fetch this location through GConf. Since Redshift for some time now has
supported a config file where the location can be set, there is not really
any reason to use an external, fragile solution to do the same.
2013-12-09 14:07:01 -05:00
Jon Lund Steffensen e4034ba27d Do not allow NULL keys when setting options
This should fix a bug where command line options for the "manual" location
provider cannot override the config file. To keep compatability with previous
versions the command line parser will still special case parsing "-l LAT:LON"
and set the correct options in "manual".
2013-12-09 12:28:45 -05:00
Jon Lund Steffensen 3b61f90b34 When in print mode do not start a gamma method
A gamma method is not needed in print mode
2013-12-09 10:58:43 -05:00
Jon Lund Steffensen 2d4a5ad26b Add dummy gamma adjustment method
This method does not do anything but print the temperature to the terminal.
An external program implementing a color temperature adjustment scheme that
is not supported by redshift can use this method to determine the desired
color temperature. It is also useful for testing other parts of redshift on
systems where neither RandR nor VidMode works.
2013-12-09 10:48:45 -05:00
Jon Lund Steffensen 3297f52f48 Fix newline in help output text 2013-12-08 20:24:27 -05:00
Jon Lund Steffensen 070bf1d3de colorramp: Use new color ramp table provided by Ingo Thies.
This table is calculated by the actual Planckian locus below 5000K, and by CIE daylight standard above 5000K.
Also, the new table applies proper gamma correction according to sRGB.
More information can be found in README-colorramp.
2013-10-21 22:52:38 -04:00
Jon Lund Steffensen 7abb16512e Fix typos (Benjamin Kerensa) 2013-10-21 16:05:51 -04:00
Jon Lund Steffensen d7e67a208f Fix slight wobble in temperature caused by float.
The transition variable 'adjustment_alpha' is a float. Redshift will wobble between 6499 and 6500K as the float runs out of precision. Using a double seems to solve the issue.
(Thanks to Sean Hildebrand)
2013-10-21 15:29:05 -04:00
Jon Lund Steffensen ca5e65383c Also print status on start up. 2012-02-02 18:39:54 +01:00
Jon Lund Steffensen 9b72cb363a Print status message when redshift is enabled/disabled by SIGUSR1. 2011-12-04 21:30:26 +01:00
Vincent Breitmoser 4bae608c5d add -p option for print mode.
This mode only prints the current screen parameters and exits.
Useful for quick lookup of this value for use in scripts.
2011-11-27 17:17:16 +01:00
Jon Lund Steffensen 802d09e83b Add various documentation updates: DESIGN and HACKING document, and various small comments int the source (Christian Jaeger).
Update man page with information on configuration file.
2011-10-18 18:02:28 +02:00
Jon Lund Steffensen f7d0b5fe72 Set buffering on stdout and stderr to line-buffered.
Previously stdout would be block buffered and stderr unbuffered when writing to a non-terminal.
This code works on Debian with libc 2.11.2. The man page of setvbuf mentions that NULL can be used to avoid affecting the used buffer, but doesn't mention whether the size argument is then ignored; testing on Debian has revealed that this code works as intended, but I don't know whether that's standard.
(Christian Jaeger)
2011-10-18 16:45:03 +02:00
Jon Lund Steffensen 3bd88a4307 Allow separate brightness for day and night (Olivier Fabre and Jeremy Erickson). 2011-10-18 16:01:17 +02:00
Jon Lund Steffensen acb7062f53 Fix build on windows platform. 2011-07-05 22:17:01 +02:00
Jon Lund Steffensen 220bf14ae2 Document brightness (-b) option switch. 2011-07-04 15:10:55 +02:00
Jon Lund Steffensen 3832a2fc7d Add option to show program version (-V). 2011-07-04 15:00:46 +02:00
Albert Lee 4b05bbee41 Use signal.h instead of sys/signal.h for POSIX compliance. 2011-07-04 14:20:51 +02:00
Jon Lund Steffensen ebcfda765e Merge manual mode from Joe Hillenbrand with some modifications. 2011-06-07 00:26:45 +02:00
Jon Lund Steffensen 38af3a0d5e Allow brightness to be adjusted (between 10% and 100%, the latter being the default). 2011-04-21 00:23:50 +02:00
Jon Lund Steffensen 28d553ddbb Merge Geoclue location provider by Mathieu Trudel-Lapierre with some tweaks. 2011-03-28 00:14:58 +02:00
Jon Lund Steffensen 9d7096d11c Fix: return 0 in parse_gamma_string() on success. 2011-03-27 21:37:10 +02:00
Joe Hillenbrand 494d1e03de Added feature to manually set temperature without needing location data. 2011-02-25 19:52:18 -08:00
Mathieu Trudel-Lapierre 3bf1f85267 Add first pass of Geoclue location provider. 2011-02-09 23:31:17 -05:00
Jon Lund Steffensen 5f68d4dfe4 Allow user to specify a configuration file on the command line that will
be parsed.
2010-10-18 00:58:00 +02:00
Jon Lund Steffensen 2b92b86857 Add configuration file support. 2010-10-15 12:43:48 +02:00
Jon Lund Steffensen 6f780c4063 Minor optimizations in selection of location provider and adjustment
method.
2010-10-15 00:52:19 +02:00
Jon Lund Steffensen 158de6e293 Add info on the neutral color temperature (6500K) in help output. 2010-10-09 23:04:43 +02:00
Jon Lund Steffensen e850a58909 Provide feedback on what location provider/color adjustment method that
is used when none was specifically requested.
2010-06-30 20:29:32 +02:00
Jon Lund Steffensen 222c21e5d2 Add reset option (activated with -x) that removes any color adjustments
applied to the screen. Based on patch by Dan Helfman.
2010-06-10 20:14:13 +02:00
Jon Lund Steffensen 6e5ec155d1 Add comments about certain substring which must not be translated.
Fix help text that refered to the wrong command line parameter.
2010-06-10 13:28:30 +02:00
Jon Lund Steffensen 68a0d443d6 Clarify translation of help text for translators.
Clarify comment about use of strtof().
2010-06-04 21:57:39 +02:00
Jon Lund Steffensen ba68997f7a Use lower case for method and provider names. 2010-05-27 02:22:46 +02:00
Jon Lund Steffensen 441dae4a44 Split init function of methods and providers into init and start.
The set_option function can be called to set options between init
 and start.
2010-05-27 02:20:29 +02:00
Jon Lund Steffensen 19f7343355 Let gamma methods and location providers print help on option parameters. 2010-05-27 00:17:47 +02:00
Jon Lund Steffensen 5be231ca8d Remove unused parameters in help text output. 2010-05-25 01:35:54 +02:00
Jon Lund Steffensen 98cc1a5657 Fix build on mingw 2010-05-25 01:33:28 +02:00
Jon Lund Steffensen 38aea51b22 Add location provider that reads location from the gconf key associated
with the GNOME Clock applet. The implementation is rather simplistic as
 it only reads the location once on init but that'll have to do for now.
2010-05-25 01:23:42 +02:00
Jon Lund Steffensen cde909747c Provide fundament for more advanced location providers. 2010-05-25 00:45:29 +02:00
Jon Lund Steffensen 65dd76a221 Use the prefix 'gamma' for gamma adjustment source files. 2010-05-24 23:37:36 +02:00
Jon Lund Steffensen 1d88c2b10c Pass arguments as string to adjustment methods. 2010-05-24 21:26:06 +02:00
Jon Lund Steffensen b1ab322cb5 Move gamma method spec structs to redshift.h 2010-05-24 20:06:14 +02:00
Jon Lund Steffensen f8c3b9839d Don't include gettext headers when NLS is disabled. 2010-05-24 18:24:56 +02:00
Jon Lund Steffensen 6f044ccad3 Use gamma_method_spec_t struct to control and iterate through different
gamma adjustment methods.
2010-05-24 18:12:36 +02:00
Jon Lund Steffensen b41d891888 Clean up code for gamma adjustment methods. 2010-05-07 00:33:21 +02:00
Jon Lund Steffensen 52a5a370fd systemtime.c: Portably read current time on posix and windows.
w32gdi.c: Implements gamma ramp method for Windows GDI API.
Use double as a cross platform time representation.
Add WinGDI as a selectable method (currently limitied to minimum 4500K).
Fix a bug where redshift would crash if RANDR failed and VidMode wasn't
 compiled in.
2010-05-06 23:56:52 +02:00
Jon Lund Steffensen fc47840a2c Don't call setlocale if NLS was disabled. 2010-05-06 23:51:31 +02:00
Jon Lund Steffensen 9c2012b85e Disable signal support if sys/signal.h was not found. 2010-05-06 23:50:23 +02:00
Jon Lund Steffensen 8583f11f21 Restructure help text and add comments for easier translation. 2010-05-05 22:37:41 +02:00
Jon Lund Steffensen 8c266ebb7a Show default temperature values in help output. 2010-05-05 22:26:13 +02:00