dotfiles/nixos/polybar.nix

82 lines
1.9 KiB
Nix
Raw Normal View History

2019-07-14 14:45:41 +01:00
{ config, pkgs, ... }:
{
services.polybar = {
enable = true;
2019-07-14 16:09:41 +01:00
script = "polybar -r main_bar &";
2019-07-14 19:24:40 +01:00
package = pkgs.polybar.override {
i3GapsSupport = true;
alsaSupport = true;
iwSupport = true;
nlSupport = false;
githubSupport = true;
};
2019-07-14 14:45:41 +01:00
config = {
2019-07-14 19:24:40 +01:00
"settings" = {screenchange-reload = "true";};
2019-07-14 14:45:41 +01:00
"bar/main_bar" = {
2019-07-14 19:24:40 +01:00
font-0 = "DejaVu Sans Mono for Powerline:size=12.0;weight=bold";
2019-07-14 16:09:41 +01:00
background = "#002b36";
foreground = "#839496";
2019-07-14 14:45:41 +01:00
bottom = "false";
2019-07-14 19:24:40 +01:00
height = 32;
2019-07-14 14:45:41 +01:00
fixed-center = "true";
line-size = 6;
padding-right = "1%";
module-margin-left = 1;
module-margin-right = 1;
2019-07-14 19:30:06 +01:00
modules-left = "i3";
2019-07-14 14:45:41 +01:00
modules-center = "date";
2019-07-14 19:30:06 +01:00
modules-right = "memory cpu battery-label battery1 battery0";
2019-07-14 14:45:41 +01:00
};
2019-07-14 19:24:40 +01:00
2019-07-14 14:45:41 +01:00
"module/date" = {
type = "internal/date";
interval = 5;
2019-07-14 16:09:41 +01:00
date = "%a %d.%m";
2019-07-14 14:45:41 +01:00
time = "%H:%M";
label = "%date% %time%";
};
2019-07-14 19:24:40 +01:00
2019-07-14 19:30:06 +01:00
"module/i3" = {
type = "internal/i3";
2019-07-14 14:45:41 +01:00
};
2019-07-14 19:24:40 +01:00
2019-07-14 14:45:41 +01:00
"module/cpu" = {
type = "internal/cpu";
2019-07-14 19:24:40 +01:00
interval = 3;
format = "CPU: <label>";
2019-07-14 14:45:41 +01:00
};
2019-07-14 19:24:40 +01:00
2019-07-14 14:45:41 +01:00
"module/memory" = {
type = "internal/memory";
2019-07-14 19:24:40 +01:00
interval = 3;
label = "MEM: %percentage_used%%";
2019-07-14 14:45:41 +01:00
};
2019-07-14 19:24:40 +01:00
"module/battery-label" = {
type = "custom/text";
content = "BAT:";
};
"module/battery0" = {
type = "internal/battery";
battery = "BAT0";
adapter = "AC";
poll-interval = "5";
format-discharging = "<label-discharging>";
label-discharging = "%percentage%%|%time%";
};
"module/battery1" = {
type = "internal/battery";
battery = "BAT1";
adapter = "AC";
poll-interval = "5";
format-discharging = "<label-discharging>";
label-discharging = "%percentage%%|%time%";
2019-07-14 14:45:41 +01:00
};
2019-07-14 19:24:40 +01:00
2019-07-14 14:45:41 +01:00
};
};
}