Commit Graph
172 Commits
Author SHA1 Message Date
Jon Lund Steffensen c0940492ed redshift-gtk: Forward errors from child to stderr
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`).
2014-11-04 00:36:19 -05:00
Jon Lund Steffensen c42f935118 Fix #112: Do not buffer lines from child indefinitely 2014-11-03 20:37:48 -05:00
Jon Lund Steffensen 970e9dc624 Fix #105: Limit decimals in displayed location to two 2014-08-16 22:49:41 -04:00
Mattias Andrée 7027488b03 Fix #90: Print N/S and E/W in the location 2014-08-16 22:34:57 -04:00
Mattias Andrée b933b617af Check for strdup failure in location-geoclue
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-05-13 02:48:17 +02:00
Jon Lund Steffensen 241eff8fe7 redshift-gtk: Notify desktop about startup completion 2014-05-08 14:44:54 -04:00
Mattias Andrée 7d74a6a48c Add support for custom transition start and end elevation
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>
2014-05-07 20:18:00 -04:00
Mattias Andrée ed9186814d Fix #41: Do not jump to 0 % or 100 % when changing direction of transition
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-05-07 17:16:13 -04:00
Maks Verver 76f8130f12 Fix line splitting logic. 2014-04-19 18:03:54 +02:00
Jon Lund Steffensen f436cf69bf Fix #64: Fix Geoclue support when run outside of X
Fix check of error value returned.
Geoclue requires DISPLAY to be set, so try DISPLAY=:0 if not already set.
2014-04-13 22:41:26 +02:00
Jon Lund Steffensen 0cf506e9cb Fix #66: Do not distribute redshift-gtk, only redshift-gtk.in 2014-04-13 22:18:44 +02:00
Jon Lund Steffensen 07c8ee9e76 Fix #67: Geoclue should pull in Glib as dependency
Add checks in configure.ac for Glib and pull in through Makefile.am when
Geoclue support is enabled.
2014-04-13 22:10:34 +02:00
Mattias Andrée 5ad49f9e49 Try to use DISPLAY=:0 if not in X
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-04-11 07:28:14 +02:00
Mattias Andrée 4202e1d6f4 Do not segfault just because an error has not been given
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-04-11 07:24:57 +02:00
Jon Lund Steffensen 9426e9fba0 redshift-gtk: Fix crash when toggling state using the status icon 2014-04-11 00:26:57 +02:00
Jon Lund Steffensen 7685169385 Fix #22: remove initial underscore from include guards 2014-03-23 01:34:05 +01:00
Philipp Hagemeister ae5c6f5d83 [redshift-gtk] Add BSD support to proc title setting 2014-03-23 01:16:44 +01:00
Mattias Andrée 3eac70572d Fix #40: redshift-gtk: toggle_item is checkbox that follows the icon
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-03-23 00:52:32 +01:00
Jon Lund Steffensen ee7252e6fd Merge pull request #46 from maandree/gamma
Apply gamma after brightness and temperature
2014-03-23 00:00:54 +01:00
Jon Lund Steffensen 09efaddd23 Merge pull request #42 from maandree/gamma-drm
Support for running Redshift outside X using libdrm
2014-03-22 20:13:00 +01:00
Mattias Andrée 67f479d057 Support for running Redshift without a graphical environment in Linux by using Direct Rendering Manager
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-03-22 19:46:11 +01:00
Jon Lund Steffensen 8e0c6dd3ac Makefile.am: Substitute AM_CPPFLAGS for deprecated INCLUDES 2014-03-22 18:23:32 +01:00
Mattias Andrée b724bf06c9 Apply gamma after brightness and termperature
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-03-18 07:11:24 +01:00
Philipp Hagemeister 3e58daa3f4 [gtk] Set proc title
Try to set the process title during startup. Before, redshift-gtk appeared as a python process.
This change enables `pgrep redshift-gtk` or `killall redshift-gtk`.
2014-03-17 15:37:37 +01:00
Jon Lund Steffensen f5da6bf71f Merge remote-tracking branch 'maandree/leaks' 2014-03-13 12:31:25 +01:00
Jon Lund Steffensen 0ab205f50a config-ini: Simplify file path construction for XDG_CONFIG_DIRS
Add comment pointing to the XDG Base Directory Specification.
2014-03-13 01:42:04 +01:00
Mattias Andrée 9a33837a3f fopen directly instead of stat:ing
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-03-13 01:42:04 +01:00
Mattias Andrée b2e2e4831c Free resources from config-ini.c on exit
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-03-13 00:29:58 +01:00
Mattias Andrée 68deadbda4 Look for configuration file in XDG_CONFIG_DIRS and /etc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-03-11 18:33:00 +01:00
Mattias Andrée bb155ac185 When looking for a redshift.conf file do not just check environment variable, also check that the file exists
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-03-11 18:20:35 +01:00
Mattias Andrée f5a7d6e393 If even HOME is missing look up the user's home directory from passwd
Signed-off-by: Mattias Andrée <maandree@operamail.com>
2014-03-11 17:57:30 +01:00
TingPing 5340f2eb40 Fix PyGI deprecated warnings 2014-01-01 14:11:11 -05:00
TingPing 8768ba76f8 Port redshift-gtk to Python3
Python 2 is no longer supported
2014-01-01 14:11:11 -05:00
Jon Lund Steffensen 87c736f39f Merge pull request #19 from TingPing/patch-1
Load config from %LOCALAPPDATA%\redshift.conf on Windows
2013-12-29 19:03:28 -08:00
TingPing e8ce0e39b4 Fix building on Windows 2013-12-29 16:06:02 -05:00
TingPing bf14e7bd12 Load config from %LOCALAPPDATA%\redshift.conf on Windows 2013-12-29 14:46:17 -05:00
Jon Lund Steffensen 169fc05f11 Make redshift-gtk read output of the redshift child process.
This allows redshift-gtk to show the current state of the redshift
process. redshift-gtk follows the enable state of redshift and toggles
the icon accordingly.

The implementation is changed to use glib to spawn the child process
instead of relying on python subprocess module. This is necessary
because of inflexibility in the python module.
2013-12-12 00:54:40 -05:00
Jon Lund Steffensen b436a6cd8e redshift-gtk: Use new GIR Gtk/Glib/AppIndicator bindings 2013-12-11 23:34:15 -05:00
Jon Lund Steffensen cf5c1a6fc7 redshift-gtk: Make custom rule in Makefile.am silent 2013-12-10 14:04:01 -05:00
Jon Lund Steffensen d007007191 Only start "dummy" gamma method if explicitly requested 2013-12-09 14:32:08 -05:00
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 9e1457a248 geoclue: Disable deprecated g_type_init() when glib >= 2.35 2013-12-09 12:40:25 -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 a4f7cf89eb Constify gamma parameter to set_temperature() methods 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 978f4acde2 location-geoclue: Fix crash when starting geoclue provider. (Thanks to Maks Verver) 2013-10-21 15:44:51 -04:00