You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
{ pkgs, lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
colors = import ../../polybar/colors.nix;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
home.packages = with pkgs; [ lm_sensors ];
|
|
|
|
services.polybar.config = {
|
|
|
|
"module/cputemp" = {
|
|
|
|
type = "custom/script";
|
|
|
|
|
|
|
|
interval = 2;
|
|
|
|
|
|
|
|
exec = "/etc/profiles/per-user/elnu/bin/sensors | /run/current-system/sw/bin/grep \"Package id 0:\" | /run/current-system/sw/bin/tr -d '+' | /run/current-system/sw/bin/awk '{print $4}'";
|
|
|
|
};
|
|
|
|
"module/battery" = {
|
|
|
|
type = "internal/battery";
|
|
|
|
battery = "BAT0";
|
|
|
|
adapter = "AC";
|
|
|
|
|
|
|
|
format-low = "<animation-low> <label-low>";
|
|
|
|
|
|
|
|
label-charging = "%{F${colors.primary}}AC%{F-} %percentage%%";
|
|
|
|
label-discharging = "%{F${colors.primary}}BAT%{F-} %percentage%%";
|
|
|
|
label-full = "%{F${colors.primary}}AC%{F-}";
|
|
|
|
|
|
|
|
animation-low-0 = "%{F${colors.primary}}BAT%{F-}";
|
|
|
|
animation-low-1 = "%{F${colors.alert}}LOW%{F-}";
|
|
|
|
|
|
|
|
full-at = 96;
|
|
|
|
low-at = 10; # default
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|