os/modules/graphical/waybar.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

97 lines
2.8 KiB
Nix
Raw Normal View History

{
lib,
config,
pkgs,
...
}:
with lib; let
psCfg = config.pub-solar;
in {
home-manager.users."${psCfg.user.name}" = {
programs.waybar = {
enable = true;
settings.main = {
layer = "top";
position = "top";
height = 32;
2024-03-26 23:06:53 +00:00
spacing = 16;
modules-left = ["sway/workspaces"];
modules-center = ["sway/mode"];
modules-right = ["network" "tray" "sway/language" "pulseaudio" "battery" "clock"];
"sway/workspaces".disable-scroll = true;
"sway/mode" = {
tooltip = false;
format = "{}";
};
"sway/window" = {
tooltip = false;
max-length = 96;
};
"sway/language" = {
format = "{}";
max-length = 2;
on-click = "${pkgs.toggle-kbd-layout}/bin/toggle-kbd-layout";
};
tray = {
icon-size = 16;
2024-03-26 23:06:53 +00:00
spacing = 16;
};
clock = {
tooltip-format = "<tt><small>{calendar}</small></tt>";
format-alt = "{:%a %d. %h %H:%M}";
calendar = {
mode-mon-col = "3";
on-scroll = "-1";
on-click-right = "mode";
format = {
2024-08-18 22:22:59 +00:00
months = "<span color='#ffead3'><b>{}</b></span>";
days = "<span color='#ecc6d9'><b>{}</b></span>";
weekdays = "<span color='#ffcc66'><b>{}</b></span>";
today = "<span color='#ff6699'><b><u>{}</u></b></span>";
};
};
};
battery = {
tooltip = false;
states = {
critical = 20;
};
full-at = 90;
2024-03-26 23:06:53 +00:00
format = "<span font='12'>{icon}</span> {capacity}%";
format-icons = ["" "" "" "" ""];
};
network = {
interval = 3;
tooltip = true;
format-wifi = "{bandwidthUpBits} up | {bandwidthDownBits} down";
format-ethernet = "{bandwidthUpBits} up | {bandwidthDownBits} down";
format-disconnected = "no network";
tooltip-format-wifi = "{essid} ({signalStrength}%) {ipaddr}";
tooltip-format-ethernet = "{ifname} {ipaddr}";
};
pulseaudio = {
tooltip = false;
format = "<span font='12'>{icon}</span> {volume}%";
format-bluetooth = "<span font='12'>{icon}</span> {volume}%";
format-muted = "<span font='12'>{icon}x</span>";
on-click = "pavucontrol";
format-icons = {
headphones = "";
handsfree = "";
headset = "";
phone = "";
portable = "";
car = "";
default = ["" "" ""];
};
};
};
style = builtins.readFile ./.config/waybar/style.css;
systemd.enable = true;
systemd.target = "sway-session.target";
};
};
}