167 lines
3.6 KiB
Nix
167 lines
3.6 KiB
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
programs.waybar = {
|
|
enable = true;
|
|
|
|
settings = {
|
|
mainBar = {
|
|
layer = "top";
|
|
position = "top";
|
|
height = 34;
|
|
spacing = 8;
|
|
|
|
modules-left = [ "hyprland/workspaces" "hyprland/window" ];
|
|
modules-center = [ "clock" ];
|
|
modules-right = [ "pulseaudio" "network" "cpu" "memory" "battery" "tray" ];
|
|
|
|
"hyprland/workspaces" = {
|
|
format = "{icon}";
|
|
on-click = "activate";
|
|
format-icons = {
|
|
"1" = "一";
|
|
"2" = "二";
|
|
"3" = "三";
|
|
"4" = "四";
|
|
"5" = "五";
|
|
"6" = "六";
|
|
"7" = "七";
|
|
"8" = "八";
|
|
"9" = "九";
|
|
"10" = "十";
|
|
active = "";
|
|
default = "";
|
|
};
|
|
};
|
|
|
|
"hyprland/window" = {
|
|
format = "{}";
|
|
separate-outputs = true;
|
|
max-length = 50;
|
|
};
|
|
|
|
clock = {
|
|
format = "{:%H:%M}";
|
|
format-alt = "{:%A, %B %d, %Y}";
|
|
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
|
};
|
|
|
|
pulseaudio = {
|
|
format = "{icon} {volume}%";
|
|
format-muted = "";
|
|
format-icons = {
|
|
default = [ "" "" "" ];
|
|
};
|
|
on-click = "pavucontrol";
|
|
};
|
|
|
|
network = {
|
|
format-wifi = " {essid}";
|
|
format-ethernet = "";
|
|
format-disconnected = "";
|
|
tooltip-format = "{ifname}: {ipaddr}";
|
|
on-click = "nm-connection-editor";
|
|
};
|
|
|
|
cpu = {
|
|
format = " {usage}%";
|
|
tooltip = false;
|
|
};
|
|
|
|
memory = {
|
|
format = " {}%";
|
|
};
|
|
|
|
battery = {
|
|
states = {
|
|
warning = 30;
|
|
critical = 15;
|
|
};
|
|
format = "{icon} {capacity}%";
|
|
format-charging = " {capacity}%";
|
|
format-plugged = " {capacity}%";
|
|
format-icons = [ "" "" "" "" "" "" "" "" "" "" ];
|
|
};
|
|
|
|
tray = {
|
|
spacing = 10;
|
|
};
|
|
};
|
|
};
|
|
|
|
style = ''
|
|
* {
|
|
font-family: "JetBrainsMono Nerd Font";
|
|
font-size: 13px;
|
|
min-height: 0;
|
|
border: none;
|
|
border-radius: 0;
|
|
}
|
|
|
|
window#waybar {
|
|
background: rgba(46, 52, 64, 0.95);
|
|
color: #eceff4;
|
|
}
|
|
|
|
#workspaces {
|
|
margin: 0 4px;
|
|
}
|
|
|
|
#workspaces button {
|
|
padding: 0 12px;
|
|
color: #d8dee9;
|
|
background: transparent;
|
|
border-bottom: 3px solid transparent;
|
|
}
|
|
|
|
#workspaces button.active {
|
|
color: #88c0d0;
|
|
border-bottom: 3px solid #88c0d0;
|
|
}
|
|
|
|
#workspaces button:hover {
|
|
background: rgba(136, 192, 208, 0.1);
|
|
}
|
|
|
|
#window {
|
|
margin: 0 8px;
|
|
color: #d8dee9;
|
|
font-weight: normal;
|
|
}
|
|
|
|
#clock,
|
|
#battery,
|
|
#cpu,
|
|
#memory,
|
|
#network,
|
|
#pulseaudio {
|
|
padding: 0 12px;
|
|
margin: 4px 2px;
|
|
background: rgba(59, 66, 82, 0.8);
|
|
border-radius: 8px;
|
|
color: #eceff4;
|
|
}
|
|
|
|
#battery.charging {
|
|
color: #a3be8c;
|
|
}
|
|
|
|
#battery.warning:not(.charging) {
|
|
color: #ebcb8b;
|
|
}
|
|
|
|
#battery.critical:not(.charging) {
|
|
color: #bf616a;
|
|
}
|
|
|
|
#pulseaudio.muted {
|
|
color: #bf616a;
|
|
}
|
|
|
|
#tray {
|
|
padding: 0 8px;
|
|
}
|
|
'';
|
|
};
|
|
}
|