sway: add battery indicator

would be nice to hide it on desktop?
This commit is contained in:
colin 2022-06-12 01:01:12 -07:00
parent ab66c9383b
commit 39049c8a9c

View File

@ -207,7 +207,7 @@ in
height = 40; height = 40;
modules-left = ["sway/workspaces" "sway/mode"]; modules-left = ["sway/workspaces" "sway/mode"];
modules-center = ["sway/window"]; modules-center = ["sway/window"];
modules-right = ["custom/mediaplayer" "clock" "cpu" "network"]; modules-right = ["custom/mediaplayer" "clock" "battery" "cpu" "network"];
"sway/window" = { "sway/window" = {
max-length = 50; max-length = 50;
}; };
@ -236,6 +236,21 @@ in
format = "{usage}% "; format = "{usage}% ";
tooltip = false; tooltip = false;
}; };
battery = {
states = {
good = 95;
warning = 30;
critical = 10;
};
format = "{icon} {capacity}%";
format-icons = [
""
""
""
""
""
];
};
clock = { clock = {
format-alt = "{:%a, %d. %b %H:%M}"; format-alt = "{:%a, %d. %b %H:%M}";
}; };