nix-configurations/home/features/desktop/polybar.nix

162 lines
5.6 KiB
Nix

{ pkgs, ... }:
{
services.polybar = {
enable = true;
script = "polybar bar &";
package = pkgs.polybar.override { i3GapsSupport = true; };
settings = {
"colors" = {
background = "#2F343F";
foreground = "f3f4f5";
foreground-active = "#50fa7b";
occupied = "#cccccc";
occupied-active = "#6790EB";
active = "#50fa7b";
alert = "#d08770";
volume-min = "#a3be8c";
volume-med = "#ebcb8b";
volume-max = "#bf616a";
};
"bar/mainbar" = {
monitor = "\${env:MONITOR}";
monitor-strict = "false";
monitor-rediect = "false";
bottom = "false";
fixed-center = "true";
width = "100%";
height = "30";
radius = "0.0";
line-size = "2";
line-color = "#000000";
border-color = "#000000";
border-size = "0";
background = "\${colors.background}";
foreground = "\${colors.foreground}";
padding-left = "1";
padding-right = "1";
module-margin-left = "3";
module-margin-right = "3";
font-0 = "Fira Code:size=10;0";
font-1 = "FontAwesome:size=13;0";
font-2 = "Fira Code:size=10;0";
font-3 = "Fira Code:size=10;0";
font-4 = "Font Awesome 6 Brands:size=13;0";
modules-left = "i3 xwindow";
modules-right = "date battery";
separator = "|";
tray-detached = "false";
tray-offset-x = "0";
tray-offset-y = "0";
tray-padding = "2";
tray-maxsize = "20";
tray-scale = "1.0";
tray-position = "right";
tray-background = "\${colors.background}";
enable-ipc = "true";
};
"module/i3" = {
type = "internal/i3";
pin-workspaces = "true";
strip-wsnumbers = "true";
indes-sort = "false";
enable-click = "true";
enable-scroll = "true";
wrapping-scroll = "true";
reverse-scroll = "false";
fuzzy-match = "true";
ws-icon-0 = "1;";
ws-icon-1 = "2;";
ws-icon-2 = "3;";
ws-icon-3 = "4;";
ws-icon-4 = "5;";
ws-icon-5 = "6;";
ws-icon-6 = "7;";
ws-icon-7 = "8;";
ws-icon-8 = "9;";
ws-icon-9 = "10;";
ws-icon-default = " ";
format = "<label-state> <label-mode>";
label-mode = "%mode";
label-mode-padding = "2";
label-mode-foreground = "#000000";
label-mode-background = "FFBB00";
label-focused = "%icon% %name%";
label-focused-underline = "#50fa7b";
label-focused-background = "\${colors.background}";
label-focused-foreground = "#8be9fd";
label-focused-padding = "2";
label-unfocused = "%icon% %name%";
label-unfocused-padding = "2";
label-unfocused-background = "\${colors.background}";
label-unfocused-foreground = "$ {colors.foreground}";
label-visible = "%icon% %name%";
label-visible-background = "\${self.label-focused-background}";
label-visible-underline = "\${self.label-focused-underline}";
label-visible-padding = "2";
label-urgent = "%icon% %name%";
label-urgent-background = "\${self.label-focused-background}";
label-urgent-foreground = "#db104e";
label-urgent-padding = "2";
format-foreground = "\${colors.foreground}";
format-background = "\${colors.background}";
};
"module/battery" = {
type = "internal/battery";
battery = "BAT0";
adapter = "AC0";
full-at = "100";
format-charging = "<animation-charging> <label-charging>";
label-charging = " %percentage%%";
format-charging-foreground = "\${colors.foreground}";
format-charging-background = "\${colors.background}";
format-charging-underline = "#ff79c6";
format-discharging = "<ramp-capacity> <label-discharging>";
label-discharging = " %percentage%%";
format-discharging-underline = "#ff79c6";
format-discharging-foreground = "\${colors.foreground}";
format-discharging-background = "\${colors.background}";
format-full-prefix = "";
format-full-prefix-foreground = "#ff79c6";
format-full-underline = "#ff79c6";
format-full-foreground = "\${colors.foreground}";
format-full-background = "\${colors.background}";
ramp-capacity-0 = "";
ramp-capacity-1 = "";
ramp-capacity-2 = "";
ramp-capacity-3 = "";
ramp-capacity-4 = "";
ramp-capacity-foreground = "#ff79c6";
animation-charging-0 = "";
animation-charging-1 = "";
animation-charging-2 = "";
animation-charging-3 = "";
animation-charging-4 = "";
animation-charging-foreground = "#ff79c6";
animation-charging-framerate = "750";
};
"module/xwindow" = {
type = "internal/xwindow";
label = "%title%";
label-maxlen = "50";
format-foreground = "\${colors.foreground}";
format-background = "\${colors.background}";
};
"module/date" = {
type = "internal/date";
interval = "5";
date = ''" %d-%m-%Y%"'';
date-alt = ''" %d-%m-%Y"'';
time = "%H:%M";
time-alt = "%H:%M";
format-prefix = " ";
format-prefix-foreground = "#ff79c6";
format-underline = "#ff79c6";
format-foreground = "\${colors.foreground}";
format-background = "\${colors.background}";
label = "%date% %time%";
};
};
};
}