diff --git a/home/modules/polybar.nix b/home/modules/polybar.nix index 6217753..272d195 100644 --- a/home/modules/polybar.nix +++ b/home/modules/polybar.nix @@ -4,125 +4,168 @@ enable = true; script = '' - polybar primary & + polybar primary & polybar secondary & ''; settings = { + "colors" = { + bg = "#151515"; + bg-alt = "#232323"; + fg = "#fafafa"; + fg-alt = "#bdbdbd"; + + blue = "#2979ff"; + cyan = "#00e5ff"; + green = "#00e676"; + orange = "#ff9100"; + pink = "#f50057"; + purple = "#d500f9"; + red = "#ff1744"; + yellow = "#ffea00"; + + black = "#000"; + white = "#FFF"; + + trans = "#00000000"; + semi-trans = "#ee282828"; + semi-trans-black = "#aa000000"; + }; + "bar/primary" = { monitor = "DVI-I-1"; width = "100%"; - height = 30; - radius = 0; - fixed-center = true; + height = "30"; + offset-y = "0"; + bottom = "true"; + fixed-center = "true"; - background = "#fbbbfb"; - foreground = "#d8dee9"; + wm-restack = "bspwm"; - line-size = 3; + override-redirect = "false"; - padding-left = 2; - padding-right = 2; + scroll-up = "next"; + scroll-down = "prev"; - module-margin-left = 1; - module-margin-right = 1; + enable-ipc = "true"; - font-0 = "FiraCode Nerd Font:size=10;2"; - font-1 = "FiraCode Nerd Font:size=12;2"; + background = "\${colors.trans}"; + foreground = "\${colors.fg}"; - modules-left = "bspwm"; - modules-center = "date"; + tray-background = "\${colors.trans}"; + tray-padding = "2"; + tray-position = "right"; + tray-maxsize = "16"; cursor-click = "pointer"; + cursor-scroll = "ns-resize"; + + modules-left = "bspwm"; + modules-center = "mpd"; + modules-right = "date"; }; "bar/secondary" = { monitor = "HDMI-0"; width = "100%"; - height = 30; - radius = 0; - fixed-center = true; + height = "30"; + offset-y = "0"; + bottom = "true"; + fixed-center = "true"; - background = "#2e3440"; - foreground = "#d8dee9"; + wm-restack = "bspwm"; - line-size = 3; + override-redirect = "false"; - padding-left = 2; - padding-right = 2; + scroll-up = "next"; + scroll-down = "prev"; - module-margin-left = 1; - module-margin-right = 1; + enable-ipc = "true"; - font-0 = "FiraCode Nerd Font:size=10;2"; - font-1 = "FiraCode Nerd Font:size=12;2"; + background = "\${colors.trans}"; + foreground = "\${colors.fg}"; - modules-left = "bspwm"; - modules-center = "date"; + tray-background = "\${colors.trans}"; + tray-padding = "2"; + tray-position = "right"; + tray-maxsize = "16"; cursor-click = "pointer"; + cursor-scroll = "ns-resize"; + + modules-left = "bspwm"; + modules-center = "mpd"; + modules-right = "date"; }; "module/bspwm" = { type = "internal/bspwm"; - ws-icon-0 = "I;○"; - ws-icon-1 = "II;○"; - ws-icon-2 = "III;○"; - ws-icon-3 = "IV;○"; - ws-icon-4 = "V;○"; - ws-icon-5 = "VI;○"; - ws-icon-6 = "VII;○"; - ws-icon-7 = "VIII;○"; - ws-icon-8 = "IX;○"; - ws-icon-default = "○"; + format = " "; - label-focused = "●"; - label-focused-foreground = "#d89ee9"; - label-focused-padding = 2; + label-focused = "%{T7}●%{T-}"; + label-focused-foreground = "\${colors.fg}"; + label-focused-padding = 1; - label-occupied = "●"; - label-occupied-padding = 2; - label-occupied-foreground = "#90ffff"; + label-occupied = "%{T7}●%{T-}"; + label-occupied-foreground = "\${colors.fg-alt}"; + label-occupied-padding = 1; - label-urgent = "%name%"; - label-urgent-background = "#bf616a"; - label-urgent-padding = 2; + label-urgent = "%{T7}●%{T-}"; + label-urgent-foreground = "\${colors.red}"; + label-urgent-padding = 1; - label-empty = "○"; - label-empty-foreground = "#4c566a"; - label-empty-padding = 2; + label-empty = "%{T7}○%{T-}"; + label-empty-foreground = "\${colors.fg-alt}"; + label-empty-padding = 1; + + label-locked = "%{T7}●%{T-}"; + label-locked-foreground = "\${colors.fg}"; + label-locked-padding = 1; + + label-sticky = "%{T7}●%{T-}"; + label-sticky-foreground = "\${colors.fg}"; + label-sticky-padding = 1; + + label-private = "%{T7}●%{T-}"; + label-private-foreground = "\${colors.fg}"; + label-private-padding = 1; + + label-marked = "%{T7}●%{T-}"; + label-marked-foreground = "\${colors.fg}"; + label-marked-padding = 1; + }; + + "module/mpd" = { + type = "internal/mpd"; + interval = 1; + format-online = ""; + format-stopped = ""; + icon-play = "%{T7}▶%{T-}"; + icon-play-foreground = "\${colors.fg}"; + icon-play-padding = 1; + icon-pause = "%{T7}⏸%{T-}"; + icon-pause-foreground = "\${colors.fg}"; + icon-pause-padding = 1; + icon-prev = "%{T7}⏮%{T-}"; + icon-prev-foreground = "\${colors.fg}"; + icon-prev-padding = 1; + icon-next = "%{T7}⏭%{T-}"; + icon-next-foreground = "\${colors.fg}"; + icon-next-padding = 1; }; "module/date" = { type = "internal/date"; interval = 1; - - date = "%d-%m-%Y"; - 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%%"; + time = "%H:%M"; + time-alt = "%a, %b %d %H:%M:%S"; + format = "%{T7}○%{T-}