D14068: add -P switch to one-shot redshift call

mat gr noreply at phabricator.kde.org
Thu Sep 27 10:55:19 BST 2018


grmat added a comment.


  In D14068#332672 <https://phabricator.kde.org/D14068#332672>, @davidedmundson wrote:
  
  > 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 + ...

REPOSITORY
  R885 Redshift Control for Plasma

REVISION DETAIL
  https://phabricator.kde.org/D14068

To: grmat, #plasma, romangg, martinkostolny
Cc: davidedmundson, ngraham, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180927/de2a9755/attachment.html>


More information about the Plasma-devel mailing list