aboutsummaryrefslogtreecommitdiffstats
path: root/src/redshift.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/redshift.c')
-rw-r--r--src/redshift.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/redshift.c b/src/redshift.c
index 9c3f404..c553abb 100644
--- a/src/redshift.c
+++ b/src/redshift.c
@@ -221,6 +221,7 @@ print_help(const char *program_name)
" color temperature)\n"
" -r\t\tDisable initial temperature transition\n"
" -s SCREEN\tX screen to apply adjustments to\n"
+ " -c CRTC\tCRTC to apply adjustments to (randr only)\n"
" -t DAY:NIGHT\tColor temperature to set at daytime/night\n"),
stdout);
fputs("\n", stdout);
@@ -253,6 +254,7 @@ main(int argc, char *argv[])
float gamma[3] = { DEFAULT_GAMMA, DEFAULT_GAMMA, DEFAULT_GAMMA };
int use_randr = -1;
int screen_num = -1;
+ int crtc_num = -1;
int transition = 1;
int one_shot = 0;
int verbose = 0;
@@ -260,7 +262,7 @@ main(int argc, char *argv[])
/* Parse arguments. */
int opt;
- while ((opt = getopt(argc, argv, "g:hl:m:ors:t:v")) != -1) {
+ while ((opt = getopt(argc, argv, "g:hl:m:ors:c:t:v")) != -1) {
switch (opt) {
case 'g':
s = strchr(optarg, ':');
@@ -342,6 +344,9 @@ main(int argc, char *argv[])
case 's':
screen_num = atoi(optarg);
break;
+ case 'c':
+ crtc_num = atoi(optarg);
+ break;
case 't':
s = strchr(optarg, ':');
if (s == NULL) {
@@ -432,7 +437,7 @@ main(int argc, char *argv[])
#ifdef ENABLE_RANDR
if (use_randr < 0 || use_randr == 1) {
/* Initialize RANDR state */
- r = randr_init(&state.randr, screen_num);
+ r = randr_init(&state.randr, screen_num, crtc_num);
if (r < 0) {
fputs(_("Initialization of RANDR failed.\n"), stderr);
if (use_randr < 0) {