non important commit

This commit is contained in:
benstrb 2026-01-11 14:20:52 +01:00
parent 70d332b4b6
commit ef564e084d
2 changed files with 113 additions and 0 deletions

View file

@ -16,6 +16,7 @@
./modules/shells.nix ./modules/shells.nix
./modules/nvf.nix ./modules/nvf.nix
./modules/kitty.nix ./modules/kitty.nix
./modules/polybar.nix
./modules/fastfetch.nix ./modules/fastfetch.nix
./modules/git.nix ./modules/git.nix
./modules/create-project/create-project.nix ./modules/create-project/create-project.nix

112
home/modules/polybar.nix Normal file
View file

@ -0,0 +1,112 @@
# home/modules/polybar.nix
{
config,
pkgs,
...
}: {
services.polybar = {
enable = true;
script = "polybar main &";
settings = {
"bar/main" = {
width = "100%";
height = 30;
radius = 0;
fixed-center = true;
background = "#2e3440";
foreground = "#d8dee9";
line-size = 3;
padding-left = 2;
padding-right = 2;
module-margin-left = 1;
module-margin-right = 1;
font-0 = "FiraCode Nerd Font:size=10;2";
font-1 = "FiraCode Nerd Font:size=12;2";
modules-left = "bspwm";
modules-center = "date";
modules-right = "cpu memory battery";
cursor-click = "pointer";
};
"module/bspwm" = {
type = "internal/bspwm";
label-focused = "%name%";
label-focused-background = "#88c0d0";
label-focused-foreground = "#2e3440";
label-focused-padding = 2;
label-occupied = "%name%";
label-occupied-padding = 2;
label-occupied-foreground = "#d8dee9";
label-urgent = "%name%";
label-urgent-background = "#bf616a";
label-urgent-padding = 2;
label-empty = "%name%";
label-empty-foreground = "#4c566a";
label-empty-padding = 2;
};
"module/date" = {
type = "internal/date";
interval = 1;
date = "%Y-%m-%d";
time = "%H:%M:%S";
format-prefix = " ";
format-prefix-foreground = "#88c0d0";
label = "%date% %time%";
};
"module/cpu" = {
type = "internal/cpu";
interval = 2;
format-prefix = " ";
format-prefix-foreground = "#a3be8c";
label = "%percentage:2%%";
};
"module/memory" = {
type = "internal/memory";
interval = 2;
format-prefix = " ";
format-prefix-foreground = "#b48ead";
label = "%percentage_used%%";
};
"module/battery" = {
type = "internal/battery";
battery = "BAT0";
adapter = "AC";
full-at = 98;
format-charging = "<label-charging>";
format-charging-prefix = " ";
format-charging-prefix-foreground = "#a3be8c";
format-discharging = "<label-discharging>";
format-discharging-prefix = " ";
format-discharging-prefix-foreground = "#ebcb8b";
format-full-prefix = " ";
format-full-prefix-foreground = "#a3be8c";
label-charging = "%percentage%%";
label-discharging = "%percentage%%";
label-full = "%percentage%%";
};
};
};
}