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/workspaces"
# "hyprland/window" # "hyprland/window"
]; ];
modules-right = [ modules-right = lib.optional hwconfig.isLaptop "backlight"
++ [
"pulseaudio" "pulseaudio"
#"network" #"network"
#"cpu" #"cpu"
#"memory" "memory"
#"temperature" #"temperature"
"hyprland/language" "hyprland/language"
] ++ lib.optional battery.available "custom/battery" ] ++ lib.optional battery.available "custom/battery"
@ -57,6 +58,11 @@ in
warning = 20; 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" = { "custom/battery" = {
exec ="${pkgs.writeShellScriptBin "battery-widget" '' exec ="${pkgs.writeShellScriptBin "battery-widget" ''
${battery.labelAdaptive} ${battery.labelAdaptive}
@ -76,7 +82,10 @@ in
"hyprland/language" = { "hyprland/language" = {
format = " {}"; format = " {}";
}; };
memory = { format = "{}% "; }; memory = {
interval = 1;
format = "{used}/{total}Gb ";
};
network = { network = {
interval = 1; interval = 1;
format-alt = "{ifname}: {ipaddr}/{cidr}"; format-alt = "{ifname}: {ipaddr}/{cidr}";

View file

@ -11,7 +11,6 @@ in
#initialPassword = "1234"; #initialPassword = "1234";
hashedPasswordFile = config.sops.secrets."users/${username}".path; hashedPasswordFile = config.sops.secrets."users/${username}".path;
packages = with pkgs; [ packages = with pkgs; [
anydesk
]; ];
}; };
sops.secrets = { sops.secrets = {