87 lines
1.9 KiB
Nix
87 lines
1.9 KiB
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
lib.mkIf (true) {
|
|
xyno.desktop.waybar.config = {
|
|
battery = {
|
|
"states" = {
|
|
"warning" = 30;
|
|
"critical" = 15;
|
|
};
|
|
"format" = "{icon} {capacity}%";
|
|
"format-icons" = [
|
|
""
|
|
""
|
|
""
|
|
""
|
|
""
|
|
];
|
|
"tooltip-format" = "Capacity: {capacity}%\nPower Draw: {power:0.2f}W\n{timeTo}\nCycles: {cycles}";
|
|
"max-length" = 25;
|
|
};
|
|
backlight = {
|
|
"device" = "amdgpu_bl1";
|
|
"format" = "{icon} {percent}%";
|
|
"format-icons" = [
|
|
""
|
|
""
|
|
""
|
|
""
|
|
""
|
|
""
|
|
""
|
|
];
|
|
"on-scroll-up" = "${pkgs.light}/bin/light -A 5";
|
|
"on-scroll-down" = "${pkgs.light}/bin/light -U 5";
|
|
};
|
|
"power-profiles-daemon" = {
|
|
format = "{icon} ";
|
|
tooltip-format = "Power profile: {profile}\nDriver: {driver}";
|
|
tooltip = true;
|
|
format-icons = {
|
|
"default" = "";
|
|
"performance" = "";
|
|
"balanced" = "";
|
|
"power-saver" = "";
|
|
};
|
|
};
|
|
modules-right = [
|
|
"battery"
|
|
"power-profiles-daemon"
|
|
"backlight"
|
|
];
|
|
};
|
|
programs.light.enable = true;
|
|
xyno.desktop.waybar.style = ''
|
|
#battery {
|
|
color: #d3869b;
|
|
}
|
|
#battery.critical:not(.charging) {
|
|
background-color: #1d2021;
|
|
animation-name: blink;
|
|
animation-duration: 0.5s;
|
|
animation-timing-function: linear;
|
|
animation-iteration-count: infinite;
|
|
animation-direction: alternate;
|
|
}
|
|
@keyframes blink {
|
|
to {
|
|
background-color: #fbf1c7;
|
|
color: #df3f71;
|
|
}
|
|
}
|
|
#battery.critical:not(.charging) {
|
|
background-color: #1d2021;
|
|
}
|
|
#battery.charging, #battery.plugged {
|
|
color: #98971a;
|
|
}
|
|
#backlight {
|
|
color: #458588;
|
|
}
|
|
'';
|
|
|
|
}
|