add -P switch to one-shot redshift call
AbandonedPublic

Authored by ngraham on Jul 12 2018, 8:53 AM.

Details

Reviewers
romangg
martinkostolny
grmat
Group Reviewers
Plasma
Summary

This trivial patch adds the missing parameter to get the familiar behaviour working for redshift versions since 1.12.

BUG: 395641

Diff Detail

Repository
R885 Redshift Control for Plasma
Lint
Lint Skipped
Unit
Unit Tests Skipped
grmat created this revision.Jul 12 2018, 8:53 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 12 2018, 8:53 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
grmat requested review of this revision.Jul 12 2018, 8:53 AM

I was hoping the bug would get linked in automatically... anyways, here it is, with additional information: https://bugs.kde.org/show_bug.cgi?id=395641

since 1.12.

what happens to users on older versions?

grmat added a comment.Sep 27 2018, 9:55 AM

what happens to users on older versions?

It breaks, as redshift <1.12 will exit with "invalid option -- 'P'".

I initially just thought of this as packaging responsibility, however, users might install those applets independently from distribution's packages.

It would be possible to make a runtime check, look for the version no. with redshift -V and add the -P switch dynamically. However, I'm not familiar with QML or where this call would be added. I thought of something like

...
property string redshiftCompat: getInstalledRedshiftVersion().split(' ')[1] < '1.12' ? '' : '-P'
property string redshiftOneTimeCommand: 'redshift -O ' + redshiftCompat + ...
ngraham commandeered this revision.Oct 16 2019, 5:39 PM
ngraham abandoned this revision.
ngraham added a reviewer: grmat.

Superseded by D23330.