Add battery
command
This commit is contained in:
parent
94ec854383
commit
d7a9b529e3
1 changed files with 17 additions and 0 deletions
17
modules/scripts/battery.nix
Normal file
17
modules/scripts/battery.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
flake.modules.homeManager.gui =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
(pkgs.writeShellApplication {
|
||||
name = "battery";
|
||||
|
||||
runtimeInputs = with pkgs; [ upower ];
|
||||
|
||||
text = ''
|
||||
upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep -E 'state|to full|percentage'
|
||||
'';
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue