{ pkgs, ... }: # Created By Aditya Shakya @adi1090x # Edited and ported to Nix by Litarvan let bg = "#272727"; fg = "#CACACA"; ac = "#1E88E5"; mf = "#383838"; in { # enable = true; package = pkgs.polybar.override { i3GapsSupport = true; alsaSupport = true; }; # script = '' # ${pkgs.xorg.xrandr}/bin/xrandr --listactivemonitors | \ # ${pkgs.gnugrep}/bin/grep -oP '(HDMI\-\d+|eDP\-\d+)' | \ # ${pkgs.findutils}/bin/xargs -P1 -I{} ${pkgs.bash}/bin/bash -c "MONITOR={} polybar -q -r main" # ''; script = "polybar -q -r main &"; config = { "global/wm" = { margin-bottom = 0; margin-top = 0; }; "bar/main" = { # monitor = "$\{env:MONITOR:}"; monitor-strict = false; override-redirect = false; bottom = true; fixed-center = true; width = "100%"; height = 36; offset-x = "0%"; offset-y = "0%"; background = bg; foreground = fg; radius-top = "0.0"; radius-bottom = "0.0"; overline-size = 6; underline-size = 6; overline-color = bg; underline-color = bg; border-top-size = 4; border-color = ac; padding = 0; module-margin-left = 0; module-margin-right = 0; font-0 = "Termsyn:size=12;2"; font-1 = "Siji:size=12;2"; font-2 = "xos4 Terminus:size = 12;1"; modules-left = "i3 cpu"; modules-center = "memory alsa battery backlight"; modules-right = "network date"; spacing = 0; dim-value = "1."; tray-position = "right"; tray-detached = false; tray-maxsize = 16; tray-background = bg; tray-offset-x = 0; tray-offset-y = 0; tray-padding = 0; tray-scale = "1.0"; enable-ipc = true; }; "settings" = { throttle-output = 5; throttle-output-for = 10; throttle-input-for = 30; screenchange-reload = false; compositing-background = "source"; compositing-foreground = "over"; compositing-overline = "over"; comppositing-underline = "over"; compositing-border = "over"; pseudo-transparency = "false"; }; "module/alsa" = { type = "internal/alsa"; format-volume = "VOL "; format-volume-background = mf; format-volume-underline = bg; format-volume-overline = bg; format-volume-padding = 2; format-volume-margin = 2; label-volume = "%percentage%%"; format-muted-background = mf; format-muted-underline = bg; format-muted-overline = bg; format-muted-padding = 2; format-muted-margin = 2; label-muted = "MUTED"; label-muted-foreground = ac; }; "module/backlight" = { type = "internal/xbacklight"; card = "intel_backlight"; # TODO: Better way to fill this format = "LGT