add miao battery percentage thing
This commit is contained in:
parent
0954b39733
commit
31db7d449c
3 changed files with 30 additions and 0 deletions
|
|
@ -22,6 +22,7 @@
|
||||||
];
|
];
|
||||||
modules-right = [
|
modules-right = [
|
||||||
"custom/keyboard-state"
|
"custom/keyboard-state"
|
||||||
|
"custom/miao-battery-percentage"
|
||||||
"tray"
|
"tray"
|
||||||
"clock"
|
"clock"
|
||||||
];
|
];
|
||||||
|
|
@ -31,6 +32,11 @@
|
||||||
"sway/window" = {
|
"sway/window" = {
|
||||||
max-length = 80;
|
max-length = 80;
|
||||||
};
|
};
|
||||||
|
"custom/miao-battery-percentage" = {
|
||||||
|
return-type = "json";
|
||||||
|
exec = "${lib.getExe self.packages.${pkgs.system}.miao-battery-percentage}";
|
||||||
|
restart-interval = "60";
|
||||||
|
};
|
||||||
"custom/keyboard-state" = {
|
"custom/keyboard-state" = {
|
||||||
return-type = "json";
|
return-type = "json";
|
||||||
exec = "${lib.getExe self.packages.${pkgs.system}.keyboard-state}";
|
exec = "${lib.getExe self.packages.${pkgs.system}.keyboard-state}";
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,6 @@
|
||||||
cartograph-cf = pkgs.callPackage ./cartograph-cf {};
|
cartograph-cf = pkgs.callPackage ./cartograph-cf {};
|
||||||
keyboard-state = pkgs.callPackage ./keyboard-state {};
|
keyboard-state = pkgs.callPackage ./keyboard-state {};
|
||||||
audio-abtest = pkgs.callPackage ./audio-abtest {};
|
audio-abtest = pkgs.callPackage ./audio-abtest {};
|
||||||
|
miao-battery-percentage = pkgs.callPackage ./miao-battery-percentage {};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
23
pkgs/miao-battery-percentage/default.nix
Normal file
23
pkgs/miao-battery-percentage/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
rustPlatform,
|
||||||
|
pkg-config,
|
||||||
|
udev,
|
||||||
|
fetchFromGitHub,
|
||||||
|
}:
|
||||||
|
rustPlatform.buildRustPackage rec {
|
||||||
|
pname = "miao-battery-percentage";
|
||||||
|
version = "0.1.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "xunuwu";
|
||||||
|
repo = "miao-battery-percentage";
|
||||||
|
rev = "e14e72dce9d946503676121759ce6130e42bb637";
|
||||||
|
hash = "sha256-NXJv8dChKPv695XMvmm+Xh0VJ1jdRhbdGMCM0LVIiD8=";
|
||||||
|
};
|
||||||
|
cargoLock.lockFile = "${src}/Cargo.lock";
|
||||||
|
|
||||||
|
nativeBuildInputs = [pkg-config];
|
||||||
|
buildInputs = [udev];
|
||||||
|
|
||||||
|
meta.mainProgram = "miao-battery-percentage";
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue