mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
autorandr: 1.12.1 -> 1.13, nixos/services/autorandr: add ignoreLeadOption
This commit is contained in:
parent
162545d3fd
commit
d599e734e5
2 changed files with 15 additions and 3 deletions
|
@ -254,6 +254,12 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ignoreLid = mkOption {
|
||||||
|
default = false;
|
||||||
|
type = types.bool;
|
||||||
|
description = lib.mdDoc "Treat outputs as connected even if their lids are closed";
|
||||||
|
};
|
||||||
|
|
||||||
hooks = mkOption {
|
hooks = mkOption {
|
||||||
type = hooksModule;
|
type = hooksModule;
|
||||||
description = lib.mdDoc "Global hook scripts";
|
description = lib.mdDoc "Global hook scripts";
|
||||||
|
@ -340,7 +346,13 @@ in {
|
||||||
startLimitIntervalSec = 5;
|
startLimitIntervalSec = 5;
|
||||||
startLimitBurst = 1;
|
startLimitBurst = 1;
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.autorandr}/bin/autorandr --batch --change --default ${cfg.defaultTarget}";
|
ExecStart = ''
|
||||||
|
${pkgs.autorandr}/bin/autorandr \
|
||||||
|
--batch \
|
||||||
|
--change \
|
||||||
|
--default ${cfg.defaultTarget} \
|
||||||
|
${optionalString cfg.ignoreLid "--ignore-lid"}
|
||||||
|
'';
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
RemainAfterExit = false;
|
RemainAfterExit = false;
|
||||||
KillMode = "process";
|
KillMode = "process";
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
python3.pkgs.buildPythonApplication rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "autorandr";
|
pname = "autorandr";
|
||||||
version = "1.12.1";
|
version = "1.13";
|
||||||
format = "other";
|
format = "other";
|
||||||
|
|
||||||
nativeBuildInputs = [ installShellFiles ];
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
@ -59,7 +59,7 @@ python3.pkgs.buildPythonApplication rec {
|
||||||
owner = "phillipberndt";
|
owner = "phillipberndt";
|
||||||
repo = "autorandr";
|
repo = "autorandr";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-7SNnbgV6PeseBD6wdilEIOfOL2KVDpnlkSn9SBgRhhM=";
|
sha256 = "sha256-pTWwDKBCZV3wkX/VHuWrwMFgUAMDvik11y+ysKiN3HU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue