mirror of
https://github.com/nix-community/home-manager
synced 2025-01-26 19:05:02 +01:00
redshift: add option to start redshift tray applet
This commit is contained in:
parent
1b0a5eb54a
commit
38020d9068
1 changed files with 11 additions and 1 deletions
|
@ -87,6 +87,15 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
tray = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = ''
|
||||||
|
Start the redshift-gtk tray applet.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
extraOptions = mkOption {
|
extraOptions = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
|
@ -118,8 +127,9 @@ in
|
||||||
"-t ${toString cfg.temperature.day}:${toString cfg.temperature.night}"
|
"-t ${toString cfg.temperature.day}:${toString cfg.temperature.night}"
|
||||||
"-b ${toString cfg.brightness.day}:${toString cfg.brightness.night}"
|
"-b ${toString cfg.brightness.day}:${toString cfg.brightness.night}"
|
||||||
] ++ cfg.extraOptions;
|
] ++ cfg.extraOptions;
|
||||||
|
command = if cfg.tray then "redshift-gtk" else "redshift";
|
||||||
in
|
in
|
||||||
"${cfg.package}/bin/redshift ${concatStringsSep " " args}";
|
"${cfg.package}/bin/${command} ${concatStringsSep " " args}";
|
||||||
RestartSec = 3;
|
RestartSec = 3;
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue