{ config, lib, pkgs, neotheme }:
with neotheme.colors;
let
guiCfg = config.profiles.gui;
in
{
layer = "bottom";
position = "top";
height = 22;
modules-left = [ "wireplumber" "custom/separator" "cpu" "custom/separator" "memory" "custom/separator" "idle_inhibitor" ];
modules-center = [ "sway/workspaces" "custom/scratchpad-indicator" ];
modules-right = [ "group/tray" "custom/separator" "network" "custom/separator" ]
++ lib.optionals (guiCfg.laptop.enable) [ "battery" "custom/separator" ]
++ [ "clock" ];
"sway/workspaces" = {
all-outputs = true;
disable-scroll = false;
format = "{name}";
persistent-workspaces = {
"1:I" = [ ];
"2:II" = [ ];
"3:III" = [ ];
"4:IV" = [ ];
"5:V" = [ ];
"6:VI" = [ ];
"7:VII" = [ ];
"8:VIII" = [ ];
"9:IX" = [ ];
"10:X" = [ ];
};
};
"clock" = {
interval = 10;
format = "TIME {:%A, %b %d %H:%M}";
};
"cpu" = {
interval = 5;
format = "CPU {usage:2}%";
};
"wireplumber" = {
format = "VOL {volume}%";
format-muted = "VOL Muted";
};
"memory" = {
interval = 5;
format = "MEM {used:0.2f}GiB";
};
"battery" = {
format = "BATT {capacity}%";
format-alt = "PWR {power}Wh";
};
"network" = {
format = "NET {ifname}";
format-wifi = "NET {essid} [{signalStrength}]";
format-ethernet = "NET [ethernet]";
format-linked = "NET {ifname} (No IP)";
format-disconnected = "NET disconnected";
tooltip-format = "{ifname} via {gwaddr}";
tooltip-format-wifi = "{ipaddr}/{cidr} via {essid} ({signaldBm}dBm)";
tooltip-format-ethernet = "{ipaddr}/{cidr} via Ethernet";
tooltip-format-disconnected = "{ifname} Disconnected";
max-length = 14;
};
"idle_inhibitor" = {
format = "CAFFEINE {status}";
};
"group/tray" = {
orientation = "inherit";
drawer = {
transition-duration = 500;
};
modules = [
"custom/tray-placeholder"
"tray"
];
};
"tray" = {
spacing = 5;
};
"custom/tray-placeholder" = {
format = "Tray >";
interval = "once";
tooltip = false;
};
"custom/scratchpad-indicator" = {
format = "(+{})";
interval = 3;
return-type = "json";
hide-empty-text = true;
exec = "${pkgs.writeShellScript "scratchpad-indicator" (import ../../scripts/scratchpad-indicator.nix)}";
on-click = "exec swaymsg scratchpad show";
on-click-right = "exec swaymsg move scratchpad";
};
"custom/separator" = {
format = "|";
interval = "once";
tooltip = false;
};
}