mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 21:29:48 +01:00
cbatticon: Add support for batteryId
For devices with more than one battery, cbatticon allows to set the battery ID as optional positional argument. If this argument is not given, it default to the first battery it would list with `cbatticon -p`. This commit adds support for the batteryId option to the cbatticon module.
This commit is contained in:
parent
f833d2a354
commit
17ead612c6
1 changed files with 10 additions and 1 deletions
|
@ -24,7 +24,7 @@ let
|
|||
++ optional (cfg.updateIntervalSeconds != null)
|
||||
"--update-interval ${toString cfg.updateIntervalSeconds}"
|
||||
++ optional (cfg.hideNotification != null && cfg.hideNotification)
|
||||
"--hide-notification");
|
||||
"--hide-notification" ++ optional (cfg.batteryId != null) cfg.batteryId);
|
||||
|
||||
in {
|
||||
meta.maintainers = [ maintainers.pmiddend ];
|
||||
|
@ -94,6 +94,15 @@ in {
|
|||
default = null;
|
||||
description = "Hide the notification popups.";
|
||||
};
|
||||
|
||||
batteryId = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
ID of the battery to monitor. List with {command}`cbatticon -p`.
|
||||
Defaults to the first entry in the list.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue