split waybar into multiple files
This commit is contained in:
parent
53c7532351
commit
7cff7f09c3
29 changed files with 953 additions and 617 deletions
87
modules/desktop/waybar/laptop.nix
Normal file
87
modules/desktop/waybar/laptop.nix
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
{
|
||||
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;
|
||||
}
|
||||
'';
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue