nixconfig/waybar/settings.nix

106 lines
3.3 KiB
Nix

{ config, lib, pkgs, programs, ... }:
{
programs.waybar = {
enable = true;
systemd.enable = true;
style = builtins.readFile ./style.css;
settings = {
mainBar = {
spacing = 4;
layer = "top";
modules-left = [ "hyprland/workspaces" "wlr/mode" "wlr/scratchpad" "user" ];
modules-center = [ "hyprland/window" ];
modules-right = [
"idle_inhibitor"
"network"
"cpu"
"memory"
"temperature"
"backlight"
"battery"
"battery#bat2"
"clock"
"wireplumber"
"tray"
];
"hyprland/workspaces" = {
on-scroll-up = "${pkgs.hyprland}/bin/hyprctl dispatch workspace e+1";
on-scroll-down =
"${pkgs.hyprland}/bin/hyprctl dispatch workspace e-1";
on-click = "activate";
format = "{id}: {icon}";
};
"hyprland/window" = { format = "{}"; };
"wlr/mode" = { format = ''<span style="italic">{}</span>''; };
"wlr/scratchpad" = {
format = "{icon} {count}";
show-empty = true;
format-icons = [ "" "" ];
tooltip = true;
tooltip-format = "{app}: {title}";
};
user = {
format = "{user} (up {work_d} days )";
interval = 60;
icon = true;
};
idle_inhibitor = {
format = "{icon}";
format-icons = [ " " " " ];
};
tray = { spacing = 10; };
clock = {
format = "{:%H:%M} ";
tooltip-format = ''
<big>{:%Y %B}</big>
<tt><small>{calendar}</small></tt>'';
format-alt = "{:%Y-%m-%d} ";
};
cpu = {
format = "{usage}% {icon0} {icon1} {icon2} {icon3} {icon4} {icon5} {icon6} {icon7}";
format-icons = [ "" "" "" "" "" "" "" "" ];
tooltip = false;
};
memory = { format = "{}% "; };
temperature = {
critical-threshold = 80;
format = "{temperatureC}°C";
format-icons = [ "" ];
};
backlight = {
# device = "intel_backlight";
on-scroll-up = "${pkgs.brightnessctl}/bin/brightnessctl set +1%";
on-scroll-down = "${pkgs.brightnessctl}/bin/brightnessctl set 1%-";
format = "{percent}% {icon}";
format-icons = [ "" "" "" "" "" "" "" "" "" ];
};
battery = {
states = {
warning = 30;
critical = 15;
};
format = "{capacity}% {icon}";
format-icons = [ "" "" "" "" "" ];
};
"battery#bat2" = { bat = "BAT2"; };
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}";
};
wireplumber = {
format = "{volume}% {icon}";
format-muted = "🔇";
on-click = "${pkgs.pwvucontrol}/bin/pwvucontrol";
format-icons = [ "" "" "" ];
};
};
};
};
}