Added backlight widget to waybar

This commit is contained in:
Aleksandr Lebedev 2025-02-23 12:23:02 +01:00
parent ab8343948c
commit 3cab603c60
2 changed files with 12 additions and 4 deletions

View file

@ -32,11 +32,12 @@ in
"hyprland/workspaces"
# "hyprland/window"
];
modules-right = [
modules-right = lib.optional hwconfig.isLaptop "backlight"
++ [
"pulseaudio"
#"network"
#"cpu"
#"memory"
"memory"
#"temperature"
"hyprland/language"
] ++ lib.optional battery.available "custom/battery"
@ -57,6 +58,11 @@ in
warning = 20;
};
};
backlight = {
format = "{percent}% 󰛩";
on-scroll-up = "${pkgs.brightnessctl}/bin/brightnessctl s 5%+";
on-scroll-down = "${pkgs.brightnessctl}/bin/brightnessctl s 5%-";
};
"custom/battery" = {
exec ="${pkgs.writeShellScriptBin "battery-widget" ''
${battery.labelAdaptive}
@ -76,7 +82,10 @@ in
"hyprland/language" = {
format = " {}";
};
memory = { format = "{}% "; };
memory = {
interval = 1;
format = "{used}/{total}Gb ";
};
network = {
interval = 1;
format-alt = "{ifname}: {ipaddr}/{cidr}";