182 lines
4.5 KiB
Nix
182 lines
4.5 KiB
Nix
{pkgs, ...}: {
|
|
services.polybar = {
|
|
enable = true;
|
|
|
|
package = pkgs.polybar.override {
|
|
mpdSupport = true;
|
|
};
|
|
|
|
script = ''
|
|
polybar primary &
|
|
polybar secondary &
|
|
'';
|
|
|
|
settings = {
|
|
"colors" = {
|
|
bg = "#151515";
|
|
bg-alt = "#232323";
|
|
fg = "#fafafa";
|
|
fg-alt = "#bdbdbd";
|
|
|
|
blue = "#2979ff";
|
|
cyan = "#00e5ff";
|
|
green = "#00e676";
|
|
orange = "#ff9100";
|
|
pink = "#f50057";
|
|
purple = "#d500f9";
|
|
red = "#ff1744";
|
|
yellow = "#ffea00";
|
|
|
|
black = "#000";
|
|
white = "#FFF";
|
|
|
|
trans = "#00000000";
|
|
semi-trans = "#ee282828";
|
|
semi-trans-black = "#aa000000";
|
|
};
|
|
|
|
"bar/primary" = {
|
|
monitor = "DVI-I-1";
|
|
|
|
width = "100%";
|
|
height = "30";
|
|
offset-y = "0";
|
|
top = "true";
|
|
fixed-center = "true";
|
|
|
|
wm-restack = "bspwm";
|
|
|
|
override-redirect = "false";
|
|
|
|
scroll-up = "next";
|
|
scroll-down = "prev";
|
|
|
|
enable-ipc = "true";
|
|
|
|
background = "\${colors.trans}";
|
|
foreground = "\${colors.fg}";
|
|
|
|
font-0 = "monospace:size=10;2";
|
|
font-1 = "monospace:size=10;2";
|
|
font-2 = "monospace:size=10;2";
|
|
font-3 = "monospace:size=10;2";
|
|
font-4 = "monospace:size=10;2";
|
|
font-5 = "monospace:size=10;2";
|
|
font-6 = "monospace:size=10;2";
|
|
font-7 = "monospace:size=12;3";
|
|
|
|
cursor-click = "pointer";
|
|
cursor-scroll = "ns-resize";
|
|
|
|
modules-left = "bspwm";
|
|
modules-center = "mpd"
|
|
modules-right = "date";
|
|
};
|
|
|
|
"bar/secondary" = {
|
|
monitor = "HDMI-0";
|
|
|
|
width = "100%";
|
|
height = "30";
|
|
offset-y = "0";
|
|
top = "true";
|
|
fixed-center = "true";
|
|
|
|
wm-restack = "bspwm";
|
|
|
|
override-redirect = "false";
|
|
|
|
scroll-up = "next";
|
|
scroll-down = "prev";
|
|
|
|
enable-ipc = "true";
|
|
|
|
background = "\${colors.trans}";
|
|
foreground = "\${colors.fg}";
|
|
|
|
font-0 = "monospace:size=10;2";
|
|
font-1 = "monospace:size=10;2";
|
|
font-2 = "monospace:size=10;2";
|
|
font-3 = "monospace:size=10;2";
|
|
font-4 = "monospace:size=10;2";
|
|
font-5 = "monospace:size=10;2";
|
|
font-6 = "monospace:size=10;2";
|
|
font-7 = "monospace:size=12;3";
|
|
|
|
cursor-click = "pointer";
|
|
cursor-scroll = "ns-resize";
|
|
|
|
modules-left = "bspwm";
|
|
modules-right = "date";
|
|
};
|
|
|
|
"module/bspwm" = {
|
|
type = "internal/bspwm";
|
|
|
|
format = "<label-state> <label-mode>";
|
|
|
|
label-focused = "%{T7}●%{T-}";
|
|
label-focused-foreground = "\${colors.fg}";
|
|
label-focused-padding = 1;
|
|
|
|
label-occupied = "%{T7}●%{T-}";
|
|
label-occupied-foreground = "\${colors.fg-alt}";
|
|
label-occupied-padding = 1;
|
|
|
|
label-urgent = "%{T7}●%{T-}";
|
|
label-urgent-foreground = "\${colors.red}";
|
|
label-urgent-padding = 1;
|
|
|
|
label-empty = "%{T7}○%{T-}";
|
|
label-empty-foreground = "\${colors.fg-alt}";
|
|
label-empty-padding = 1;
|
|
|
|
label-locked = "%{T7}●%{T-}";
|
|
label-locked-foreground = "\${colors.fg}";
|
|
label-locked-padding = 1;
|
|
|
|
label-sticky = "%{T7}●%{T-}";
|
|
label-sticky-foreground = "\${colors.fg}";
|
|
label-sticky-padding = 1;
|
|
|
|
label-private = "%{T7}●%{T-}";
|
|
label-private-foreground = "\${colors.fg}";
|
|
label-private-padding = 1;
|
|
|
|
label-marked = "%{T7}●%{T-}";
|
|
label-marked-foreground = "\${colors.fg}";
|
|
label-marked-padding = 1;
|
|
};
|
|
|
|
"module/date" = {
|
|
type = "internal/date";
|
|
interval = 1;
|
|
time = "%H:%M";
|
|
time-alt = "%a, %b %d %H:%M:%S";
|
|
format = "%{T7}○%{T-} <label>";
|
|
format-foreground = "\${colors.fg}";
|
|
format-padding = 1;
|
|
label = "%{T2}%time%%{T-}";
|
|
};
|
|
|
|
"module/mpd" = {
|
|
type = "internal/mpd";
|
|
interval = 1;
|
|
format-online = "<icon-prev><toggle><icon-next>";
|
|
format-stopped = "<icon-prev><toggle><icon-next>";
|
|
icon-play = "%{T7}▶%{T-}";
|
|
icon-play-foreground = "\${colors.fg}";
|
|
icon-play-padding = 1;
|
|
icon-pause = "%{T7}⏸%{T-}";
|
|
icon-pause-foreground = "\${colors.fg}";
|
|
icon-pause-padding = 1;
|
|
icon-prev = "%{T7}⏮%{T-}";
|
|
icon-prev-foreground = "\${colors.fg}";
|
|
icon-prev-padding = 1;
|
|
icon-next = "%{T7}⏭%{T-}";
|
|
icon-next-foreground = "\${colors.fg}";
|
|
icon-next-padding = 1;
|
|
};
|
|
};
|
|
};
|
|
}
|