disks in waybar for allegro

This commit is contained in:
Antoine Vaure 2024-10-21 01:00:11 +02:00
parent c273da5bd6
commit 0e25cb468e

22
bar.nix
View file

@ -69,14 +69,23 @@
"group/disks" = { "group/disks" = {
orientation = "inherit"; orientation = "inherit";
modules = [ "disk" "disk#2" "disk#3" ]; modules = [
"disk" # /
]
++
(if (variant == "default") then [
"disk#2"
"disk#3"
] else if (variant == "allegro") then [
"disk#home"
] else []);
}; };
backlight = { backlight = {
device = "intel_backlight"; device = "intel_backlight";
format = "{icon}"; format = "{icon}";
"on-click" = "${pkgs.light}/bin/light -S 100"; # "on-click" = "${pkgs.light}/bin/light -S 100";
"on-click-right" = "${pkgs.light}/bin/light -S 1"; # "on-click-right" = "${pkgs.light}/bin/light -S 1";
"tooltip-format" = "{percent}%"; "tooltip-format" = "{percent}%";
"format-icons" = [ "󰛩" "󱩎" "󱩏" "󱩐" "󱩑" "󱩒" "󱩓" "󱩔" "󱩕" "󱩖" "󰛨" ]; "format-icons" = [ "󰛩" "󱩎" "󱩏" "󱩐" "󱩑" "󱩒" "󱩓" "󱩔" "󱩕" "󱩖" "󰛨" ];
}; };
@ -132,6 +141,13 @@
"on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /home/${username}/disk2"; "on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /home/${username}/disk2";
}; };
"disk#home" = lib.attrsets.optionalAttrs (variant == "allegro") {
interval = 1;
format = "󰋊 {free}";
path = "/home/${username}";
"on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /home/${username}";
};
memory = { memory = {
interval = 1; interval = 1;
format = "󰧑 {percentage:2}%"; format = "󰧑 {percentage:2}%";