253 lines
6.5 KiB
Nix
253 lines
6.5 KiB
Nix
|
let
|
||
|
colors = {
|
||
|
fg = "#FFFFFF";
|
||
|
bg = "#191830";
|
||
|
border = "#F72585";
|
||
|
warn = "#f00";
|
||
|
altfg = "#F72585";
|
||
|
|
||
|
invisible = "#00400080";
|
||
|
|
||
|
currentWorkspace = "#FAD000";
|
||
|
seperatorColor = "#FAD000";
|
||
|
};
|
||
|
in
|
||
|
{
|
||
|
|
||
|
home-manager.users.grape.services.polybar = {
|
||
|
enable = true;
|
||
|
script = "polybar --reload";
|
||
|
# Nix is great and all.. but this is a bit too execsive
|
||
|
config = {
|
||
|
"module/date" = {
|
||
|
type = "internal/date";
|
||
|
font-1 = "Jetbrains Mono Nerd font";
|
||
|
interval = 1;
|
||
|
time = "%I:%M:%S";
|
||
|
date = "%Y-%m-%d%";
|
||
|
format = "<label>";
|
||
|
label = "%time% %date%";
|
||
|
label-foreground = "${colors.fg}";
|
||
|
};
|
||
|
|
||
|
#
|
||
|
# Labels
|
||
|
#
|
||
|
"module/s" = {
|
||
|
type = "custom/text";
|
||
|
label = " | ";
|
||
|
label-foreground = "${colors.seperatorColor}";
|
||
|
};
|
||
|
"module/cpu-label" = {
|
||
|
type = "custom/text";
|
||
|
label = "CPU ";
|
||
|
label-foreground = "${colors.seperatorColor}";
|
||
|
};
|
||
|
"module/gpu-label" = {
|
||
|
type = "custom/text";
|
||
|
label = "GPU ";
|
||
|
label-foreground = "${colors.seperatorColor}";
|
||
|
};
|
||
|
"module/ram-label" = {
|
||
|
type = "custom/text";
|
||
|
label = "RAM ";
|
||
|
label-foreground = "${colors.seperatorColor}";
|
||
|
};
|
||
|
"module/replay-label" = {
|
||
|
type = "custom/text";
|
||
|
label = "REPLAY ";
|
||
|
label-foreground = "${colors.seperatorColor}";
|
||
|
};
|
||
|
"module/battery-label" = {
|
||
|
type = "custom/text";
|
||
|
label = "BAT ";
|
||
|
label-foreground = "${colors.seperatorColor}";
|
||
|
};
|
||
|
|
||
|
"module/fs-label-system" = {
|
||
|
type = "custom/text";
|
||
|
label = "SYS ";
|
||
|
label-foreground = "${colors.seperatorColor}";
|
||
|
};
|
||
|
"module/fs-label-data" = {
|
||
|
type = "custom/text";
|
||
|
label = "DAT ";
|
||
|
label-foreground = "${ colors. seperatorColor}";
|
||
|
};
|
||
|
#
|
||
|
# End of labels
|
||
|
#
|
||
|
"module/ewmh" = {
|
||
|
type = "internal/xworkspaces";
|
||
|
pin-workspaces = false;
|
||
|
label-active-foreground = "${colors.currentWorkspace}";
|
||
|
};
|
||
|
|
||
|
"module/wired-network" = {
|
||
|
type = "internal/network";
|
||
|
interface = "eno2";
|
||
|
label-foreground = "${colors.fg}";
|
||
|
};
|
||
|
"module/wireless-network" = {
|
||
|
type = "internal/network";
|
||
|
interface = "wlo1";
|
||
|
label-foreground = "${colors.fg}";
|
||
|
};
|
||
|
|
||
|
"module/cpu-temp" = {
|
||
|
type = "internal/temperature";
|
||
|
format = "<label> ";
|
||
|
format-warn = "<label-warn> ";
|
||
|
base-temperature = 20;
|
||
|
warn-temperature = 85;
|
||
|
label-warn-foreground = "${colors.warn}";
|
||
|
label-foreground = "${colors.fg}";
|
||
|
thermal-zone = 0;
|
||
|
zone-type = "x86_pkg_temp";
|
||
|
hwmon-path = "/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input";
|
||
|
};
|
||
|
|
||
|
|
||
|
"module/cpu-usage" = {
|
||
|
type = "internal/cpu";
|
||
|
interval = "1.5";
|
||
|
format = "<label>";
|
||
|
label = "CPU %percentage%%";
|
||
|
format-foreground = "${colors.fg}";
|
||
|
};
|
||
|
|
||
|
"module/gpu-temp" = {
|
||
|
type = "custom/script";
|
||
|
interval = "1.5";
|
||
|
exec = "nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits";
|
||
|
format = "<label>";
|
||
|
format-suffix = "°C ";
|
||
|
};
|
||
|
|
||
|
"module/gpu-usage" = {
|
||
|
type = "custom/script";
|
||
|
interval = "1.5";
|
||
|
exec = "nvidia-smi --query-gpu=memory.used --format=csv,noheader,nounits";
|
||
|
format-suffix = "mb ";
|
||
|
};
|
||
|
|
||
|
"module/memory" = {
|
||
|
type = "internal/memory";
|
||
|
interval = 1;
|
||
|
label = "%used%";
|
||
|
label-warn = "%used%";
|
||
|
warn-percentage = 70;
|
||
|
label-warn-foreground = "${colors.warn}";
|
||
|
};
|
||
|
|
||
|
|
||
|
"module/audio" = {
|
||
|
type = "internal/alsa";
|
||
|
use-ui-max = false;
|
||
|
interval = 5;
|
||
|
label-volume = "%percentage%%";
|
||
|
label-muted = "muted";
|
||
|
label-muted-foreground = "${colors.altfg}";
|
||
|
};
|
||
|
|
||
|
|
||
|
"module/replay" = {
|
||
|
type = "custom/script";
|
||
|
exec = "~/.config/scripts/status.sh";
|
||
|
interval = 1;
|
||
|
click-left = "~/.config/scripts/start_replay.sh";
|
||
|
click-middle = "~/.config/scripts/save_replay.sh";
|
||
|
click-right = "~/.config/scripts/stop_replay.sh";
|
||
|
};
|
||
|
|
||
|
|
||
|
"module/music" = {
|
||
|
type = "custom/script";
|
||
|
interval = ".5";
|
||
|
exec = "~/.config/scripts/music.sh";
|
||
|
format = "<label>";
|
||
|
};
|
||
|
|
||
|
"module/cava" = {
|
||
|
type = "custom/script";
|
||
|
tail = "true";
|
||
|
exec = "$HOME/.config/scripts/cava.sh";
|
||
|
format = "<label>";
|
||
|
format-font = 5;
|
||
|
label-foreground = "${colors.fg}";
|
||
|
label = " %{T1}%output%%{T-}";
|
||
|
};
|
||
|
|
||
|
"fs-base" = {
|
||
|
type = "internal/fs";
|
||
|
label-unmounted = "?";
|
||
|
format-prefix-foreground = "${colors.fg}";
|
||
|
warn-precentage = "80%";
|
||
|
};
|
||
|
|
||
|
|
||
|
"module/fs-system" = {
|
||
|
"inherit" = "fs-base";
|
||
|
mount-0 = "/";
|
||
|
interval = 30;
|
||
|
label-mounted = "%free%(%total%)";
|
||
|
};
|
||
|
|
||
|
|
||
|
|
||
|
"module/fs-data" = {
|
||
|
"inherit" = "fs-base";
|
||
|
mount-0 = "/mnt/terra";
|
||
|
interval = 30;
|
||
|
label-mounted = "%free%(%total%)";
|
||
|
};
|
||
|
|
||
|
"module/battery" = {
|
||
|
type = "internal/battery";
|
||
|
full-at = 95;
|
||
|
low-at = 20;
|
||
|
battery = "BAT0";
|
||
|
adapter = "AC0";
|
||
|
poll-interval = 4;
|
||
|
};
|
||
|
"global/wm" = {
|
||
|
override-redirect = false;
|
||
|
};
|
||
|
|
||
|
"bar/default" = {
|
||
|
font-0 = "Jetbrains Mono Nerd font:size=11;3";
|
||
|
font-1 = "Jetbrains Mono Nerd font:size=11;1";
|
||
|
bottom = false;
|
||
|
|
||
|
# dimensons
|
||
|
width = "100%";
|
||
|
height = 40;
|
||
|
radius = 15;
|
||
|
|
||
|
# Padding for modules
|
||
|
padding-left = 5;
|
||
|
padding-right = 5;
|
||
|
|
||
|
|
||
|
# setting colors
|
||
|
background = "${colors.bg}";
|
||
|
foreground = "${colors.fg}";
|
||
|
|
||
|
# border for bar
|
||
|
# TODO for some reason i cant give the bar a margin-top and therefore i cant have a colored margin.. instead its invisible for now
|
||
|
border-size = "10px";
|
||
|
# border-color = ${colors.border}
|
||
|
border-color = "${colors.invisible}";
|
||
|
|
||
|
# Displayed modules
|
||
|
modules-left = "date s ewmh s wired-network wireless-network s audio s music";
|
||
|
modules-center = "cava";
|
||
|
|
||
|
# TODO Add gpu usage and temp
|
||
|
modules-right = "battery-label battery s fs-label-data fs-data s fs-label-system fs-system s replay-label replay s ram-label memory s gpu-label gpu-usage gpu-temp s cpu-label cpu-temp cpu-usage";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
};
|
||
|
}
|