dotfiles/nix/configs/polybar/bottom.nix

125 lines
4 KiB
Nix
Raw Permalink Normal View History

{ pkgs, ... }:
let
# todo add this to flake.nix
colors = {
fg = "#FFFFFF";
bg = "#191830";
border = "#F72585";
warn = "#f00";
altfg = "#F72585";
invisible = "#00400080";
currentWorkspace = "#FAD000";
seperatorColor = "#FAD000";
};
2024-07-31 07:17:52 +02:00
script = "~/dotfiles/scripts";
in
{
home-manager.users.grape.services.polybar = {
config = {
"module/cava" = {
type = "custom/script";
tail = "true";
exec = "${script}/cava.sh";
format = "%{T2}%{F${colors.bg}}%{F-}%{T-}<label>%{T2}%{F${colors.bg}}%{F-}%{T-}";
format-font = 5;
label-foreground = "${colors.fg}";
label-background = "${colors.bg}";
label = " %{T1}%output%%{T-}";
};
"module/a" = {
label = " ";
label-foreground = "#FAD000";
type = "custom/text";
};
"module/music-capsule" = {
exec = "${script}/music.sh";
format = "%{T2}%{F${colors.bg}}%{F-}%{T-}<label>%{T2}%{F${colors.bg}}%{F-}%{T-}";
interval = ".5";
label-background = "${colors.bg}";
type = "custom/script";
};
"module/audio-capsule" = {
label-muted = "muted";
format-volume = "%{T2}%{F#191830}%{F-}%{T-}<label-volume>%{T2}%{F#191830}%{F-}%{T-}";
format-muted = "%{T2}%{F#191830}%{F-}%{T-}<label-muted>%{T2}%{F#191830}%{F-}%{T-}";
label-muted-foreground = "#FF0";
label-volume-background = "#191830";
label-muted-background = "#191830";
label-volume = "%percentage%%";
type = "internal/alsa";
use-ui-max = "true";
click-right = "pavucontrol";
};
2024-07-31 07:17:52 +02:00
"module/replay" = {
type = "custom/script";
exec = "~/.config/scripts/status.sh";
interval = 1;
label-background = "#191830";
format = "%{T2}%{F#191830}%{F-}%{T-}%{B${colors.bg}}%{F${colors.seperatorColor}}REPLAY %{F-}%{B-}<label>%{T2}%{F#191830}%{F-}%{T-}";
};
"module/wired-network" = {
type = "internal/network";
interface = "eno2";
interval = ".5";
format = "%{T2}%{F#191830}%{F-}%{T-}<label>%{T2}%{F#191830}%{F-}%{T-}";
label-background = "#191830";
format-connected = "%{T2}%{F#191830}%{F-}%{T-}<label-connected>%{T2}%{F#191830}%{F-}%{T-}";
format-disconnected = "%{T2}%{F#191830}%{F-}%{T-}%{F${colors.warn}}eno%{F-}%{T2}%{F#191830}%{F-}%{T-}";
label-connected = "%{F${colors.seperatorColor}}%{F-} %downspeed% %{F${colors.seperatorColor}}%{F-} %upspeed%";
label-disconnected = "%{F${colors.seperatorColor}}%{F-} %downspeed% %{F${colors.seperatorColor}}%{F-} %upspeed%";
label-connected-background = "${colors.bg}";
label-disconnected-background = "${colors.bg}";
};
"module/wireless-network" = {
type = "internal/network";
interface = "wlo1";
interval = ".5";
format-connected = "%{T2}%{F#191830}%{F-}%{T-}<label-connected>%{T2}%{F#191830}%{F-}%{T-}";
format-disconnected = "%{T2}%{F#191830}%{F-}%{T-}%{F${colors.warn}}wlo1%{F-}%{T2}%{F#191830}%{F-}%{T-}";
label-background = "#191830";
label-connected = "%{F${colors.seperatorColor}}%{F-} %downspeed% %{F${colors.seperatorColor}}%{F-} %upspeed%";
label-connected-background = "${colors.bg}";
label-disconnected-background = "${colors.bg}";
};
"bar/bottom" = {
background = "#00191830";
border-color = "#00400080";
border-size = "10px";
bottom = "true";
font-0 = "Jetbrains Mono Nerd font:size=11;3";
font-1 = "Jetbrains Mono Nerd font:size=22;5";
foreground = "#FFFFFF";
height = "34";
modules-center = "cava";
2024-07-31 07:17:52 +02:00
modules-left = "audio-capsule a music-capsule";
modules-right = " wireless-network a replay";
padding-left = "5";
padding-right = "5";
radius = "20";
width = "100%";
};
};
};
}