{ config, inputs, ... }: {
xdg.configFile."waybar/themes".source = "${inputs.catppuccin-waybar}/themes";
programs.waybar = {
enable = true;
systemd.enable = true;
systemd.target = "hyprland-session.target";
style = ''
@import "themes/mocha.css";
* {
font-family: FantasqueSansMono Nerd Font;
font-size: 17px;
min-height: 0;
}
#waybar {
background: transparent;
color: @text;
margin: 5px 5px;
}
#workspaces {
border-radius: 1rem;
margin: 5px;
background-color: @surface0;
margin-left: 1rem;
}
#workspaces button {
color: @lavender;
border-radius: 1rem;
padding: 0.4rem;
}
#workspaces button.active {
color: @sky;
border-radius: 1rem;
}
#workspaces button:hover {
color: @sapphire;
border-radius: 1rem;
}
#tray,
#clock,
#idle_inhibitor
#battery,
#pulseaudio,
#bluetooth,
#network,
#cpu,
#temperature,
#memory {
background-color: @surface0;
padding: 0.25rem 0.5rem;
margin: 5px 0;
}
#clock {
color: @blue;
border-radius: 1rem 1rem 1rem 1rem;
margin-right: 1rem;
}
#idle_inhibitor {
color: @peach;
border-radius: 0px 1rem 1rem 0px;
margin-right: 1rem;
}
#battery {
color: @teal;
}
#battery.charging {
color: @green;
}
#battery.warning:not(.charging) {
color: @red;
}
#backlight {
color: @yellow;
}
#backlight, #battery {
border-radius: 0;
}
#pulseaudio {
color: @maroon;
border-radius: 1rem 0px 0px 1rem;
margin-left: 1rem;
}
#bluetooth {
color: @sapphire;
}
#network {
color: @lavender;
border-radius: 0px 1rem 1rem 0px;
margin-right: 1rem;
}
#cpu {
color: @blue;
border-radius: 1rem 0px 0px 1rem;
}
#temperature {
color: @yellow;
}
#memory {
color: @sky;
}
#tray {
margin-right: 1rem;
border-radius: 1rem;
}
'';
settings = {
mainBar = {
layer = "top";
position = "top";
height = 48;
modules-left = [ "hyprland/workspaces" ];
modules-center = [ "clock" "backlight/slider" ];
modules-right = [ "pulseaudio" "bluetooth" "network" "battery" "cpu" "temperature" "memory" "idle_inhibitor" "tray" ];
"tray" = {
icon-size = 21;
spacing = 10;
};
"idle_inhibitor" = {
format = "{icon}";
format-icons = {
activated = "";
deactivated = "";
};
};
"pulseaudio" = {
# // "scroll-step": 1, // %, can be a float
format = "{volume}% {icon} {format_source}";
format-bluetooth = "{volume}% {icon} {format_source}";
format-bluetooth-muted = " {icon} {format_source}";
format-muted = " {format_source}";
format-source = "{volume}% ";
format-source-muted = "";
"format-icons" = {
headphone = "";
hands-free = "";
headset = "";
phone = "";
portable = "";
car = "";
default = [ "" "" "" ];
};
on-click = "pavucontrol";
};
"wireplumber" = {
on-click = "helvum";
max-volume = 150;
scroll-step = 0.2;
# format-bluetooth = "{volume}% {icon} {format_source}";
# format-bluetooth-muted = " {icon} {format_source}";
format-muted = " ";
format = "{volume}% {icon} ";
# format-source-muted = "";
format-icons = {
# headphone = "";
# hands-free = "";
# headset = "";
# phone = "";
# portable = "";
# car = "";
default = [ "" "" "" ];
};
# on-click = "pavucontrol"
};
"network" = {
format-wifi = "{essid} ({signalStrength}%) ";
format-ethernet = "{ipaddr}/{cidr} ";
tooltip-format = "{ifname} via {gwaddr} ";
format-linked = "{ifname} (No IP) ";
format-disconnected = "Disconnected ⚠";
format-alt = "{ifname}: {ipaddr}/{cidr}";
};
"backlight/slider" = {
min = 1;
max = 100;
orientation = "horizontal";
# device = "intel_backlight";
};
"clock" = {
format = "{:%H:%M} ";
format-alt = "{:%A, %B %d, %Y (%R)} ";
# timezone = config.time.timeZone;
timezone = "US/Mountain";
tooltip-format = "{calendar}";
"calendar" = {
mode = "year";
mode-mon-col = 3;
weeks-pos = "right";
on-scroll = 1;
on-right-click = "mode";
"format" = {
months = "{}";
days = "{}";
weeks = "W{}";
weekdays = "{}";
today = "{}";
};
};
};
"battery" = {
interval = 60;
states = {
"warning" = 30;
"critical" = 15;
};
format = "{capacity}% {icon}";
format-icons = [ "" "" "" "" "" ];
max-length = 25;
};
"cpu" = {
format = "{usage}% ";
tooltip = false;
};
"memory" = {
format = "{used:0.1f}G/{total:0.1f}G ";
};
"temperature" = {
format = "{temperatureC}°C ";
};
"keyboard-state" = {
# numlock = true;
capslock = true;
"format" = {
numlock = "N {icon}";
# capslock = "C {icon}";
};
"format-icons" = {
locked = "";
unlocked = "";
};
};
};
};
};
}