diff options
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 73 |
1 files changed, 65 insertions, 8 deletions
diff --git a/src/common.h b/src/common.h index b50bb6a..cc1852d 100644 --- a/src/common.h +++ b/src/common.h @@ -636,19 +636,74 @@ struct setting_time { time_t value; }; +struct setting_colour { + struct setting_lu temperature; + struct setting_f brightness; + struct setting_f3 gamma; +}; + +/** + * Intermediate settings representation with settings sources + * used for determining whether settings from the configuration + * file (which is parsed after the command line) applied or + * are specified multiple times in the configuration file + * + * Settings without a source can only be specified in the + * command line + */ struct settings { + /** + * The path to the configuration, `NULL` if unspecified + * (search default paths) + * + * This represents the "-c" option + */ const char *config_file; - int until_death; - struct config_ini_state config; + /** + * Whether the program should, if ran in one-shot mode, + * pause after applying the effect and reset them when + * killed + * + * This represents the "-d" option + */ + int until_death; - struct { - struct setting_lu temperature; - struct setting_f brightness; - struct setting_f3 gamma; - } day, night; + /** + * Whether the program should preserve preapplied + * colour calibrations + * + * This represents the "preserve-gamma" setting and + * "-P" (off) and "+P" (on) options + */ struct setting_i preserve_gamma; - struct setting_i use_fade; /* Whether to fade between large skips in colour temperature */ + + /** + * Whether smooth transitions shall be applied when + * a large change in colour settings occurs + * + * This represents the "fade" setting (or the deprecated + * alias "transition") and "-r" (off) and "+r" (on) options + */ + struct setting_i use_fade; + + /** + * Whether the program should start in disabled mode + * + * This represents the "start-disabled" setting and + * "-D" (off) and "+D" (on) options + */ + struct setting_i disabled; + + /** + * The colour settings to apply at daytime + */ + struct setting_colour day; + + /** + * The colour settings to apply at nighttime + */ + struct setting_colour night; struct setting_f elevation_high; /* TODO no cmdline option */ struct setting_f elevation_low; /* TODO no cmdline option */ @@ -666,6 +721,8 @@ struct settings { const struct location_provider *provider; /* Arguments for location provider */ char *provider_args; + + struct config_ini_state config; }; |