Add laptop configuration for Waybar

This commit is contained in:
Yorick Barbanneau 2023-09-07 17:26:35 +02:00
parent 658eea8539
commit c8c70a13fe

View file

@ -1,4 +1,5 @@
_: {
{hostConfig, ...}:
{
programs.waybar = {
enable = true;
systemd = {
@ -15,8 +16,13 @@ _: {
"sway/workspaces"
"sway/mode"
];
modules-right = [
"network"
modules-right = [ "network" ]
++ (if hostConfig.laptop then
[ "custom/sep"
"backlight"
"battery"]
else null
) ++ [
"custom/sep"
"memory"
"cpu"
@ -96,6 +102,41 @@ _: {
"format" = "{temperatureC}°C ";
"thermal-zone" = "6";
};
"backlight" = {
"format" = "{percent}% {icon}";
"format-icons" = [
"󰌶"
"󱩏"
"󱩐"
"󱩐"
"󱩑"
"󱩒"
"󱩓"
"󱩔"
"󱩕"
"󱩖"
"󰛨"
];
};
"battery" = {
"tooltip" = false;
"states" = {
"full" = 100;
"warning" = 30;
"critical" = 15;
};
"format" = "{capacity}% {icon}";
"format-charging" = "{capacity}% 󰓦";
"format-plugged" = "{capacity}% ";
"format-alt" = "{time} {icon}";
"format-icons" = [
" "
" "
" "
" "
" "
];
};
};
};
style = ''