# Про единицы измерения # Если просто написать число, то это будет количество пробелом в прямом смысле. Размер зависит от шрифта # Если указать pt (points), то это 1/72 часть дюйма, которая преобразуется в количество пикселей в зависимости от DPI монитора # Если указывать px, то это пиксели, логично # Интересные готовые скрипты для polybar https://github.com/polybar/polybar-scripts # Указание цветов из темы stylix # color0 = "${config.lib.stylix.colors.base00}"; # В случае с gruvbox это будет цвет "#282828" # Ниже цвета просто dark-meduim, после него material-dark-medium # base00: "#282828" "#292828" # base01: "#3c3836" "#32302f" # base02: "#504945" "#504945" # base03: "#665c54" "#665c54" # base04: "#bdae93" "#bdae93" # base05: "#d5c4a1" "#ddc7a1" # base06: "#ebdbb2" "#ebdbb2" # base07: "#fbf1c7" "#fbf1c7" # base08: "#fb4934" "#ea6962" # base09: "#fe8019" "#e78a4e" # base0A: "#fabd2f" "#d8a657" # base0B: "#b8bb26" "#a9b665" # base0C: "#8ec07c" "#89b482" # base0D: "#83a598" "#7daea3" # base0E: "#d3869b" "#d3869b" # base0F: "#d65d0e" "#bd6f3e" # Если в коммент коде цвет указан напрямую, то это дотсы zproger с левой темой # Варианты кликов мыши # click-left # click-middle # click-right # scroll-up # scroll-down # double-click-left # double-click-middle # double-click-right { config, ... }: let gruvbox = { black = "#000000"; dark = "#1d1d1d"; disabled = "${config.lib.stylix.colors.base00}"; # #282828 red = "${config.lib.stylix.colors.base08}"; # #fb4934 red-alt = "#b22222"; orange = "${config.lib.stylix.colors.base09}"; # #fe8019 orange-mat = "#e78a4e"; yellow = "${config.lib.stylix.colors.base0A}"; # #fabd2f yellow-mat = "#d8a657"; green = "${config.lib.stylix.colors.base0B}"; # #b8bb26 green-alt = "#98971a"; aqua = "${config.lib.stylix.colors.base0C}"; # #8ec07c aqua-alt = "#689d6a"; blue = "#458588"; blue-alt = "${config.lib.stylix.colors.base0D}"; # #83a598 grey = "#313131"; dark-grey = "#222222"; cream = "${config.lib.stylix.colors.base07}"; # #fbf1c7 white = "#FFFFFF"; transparent = "#00000000"; Stransparent = "#CC000000"; }; in { # Статус бар внизу services.polybar = { enable = true; settings = { # Или переимоневать в "config"? Не понял в чём разница # "colors" = {}; "global/wm" = { margin-bottom = 0; }; # bottom это просто имя, это не говорит бару быть внизу, можно написать что угодно "bar/bottom" = { monitor = "polybar -M | cut -d ':' -f 1"; # содержит список мониторов monitor-strict = false; # Require the monitor to be in connected state monitor-exact = true; # Зачем? Нечёткий поиск мониторов, если они называются по разному с разными драйверами bottom = true; # Put the bar at the bottom of the screen fixed-center = true; # Мидл модуль будет по центру экрана. При false будет между левым и правым модулями width = "100%"; # Ширина относительно ширины монитора height = "20pt"; # Высота относительно высоты монитора. Не ебу что значит pt offset-x = 0; # Offset the bar window in the x and/or y direction. offset-y = 0; # Supports any percentage with offset relative to the monitor width or height padding = 0; # Padding to add at the beginning/end of the bar. Можно юзать padding-{left,right} enable-ipc = true; # Enable support for inter-process messaging double-click-interval = 400; # If two clicks are received within this interval (ms), they are recognized as a double click. module-margin = 1; # Margin to add before/after each module. Можно юзать module-margin-{left,right} # separator = " "; # The separator will be inserted between the output of each module # separator-foreground = gruvbox.transparent; # background = gruvbox.transparent; # Фон бара # foreground = gruvbox.cream; # Передний план # border-color = gruvbox.transparent; # Цвет контура # border-size = "3pt"; # Размер контура # line-color = "#f00"; # Under-/overline argb color. Может быть {overline,underline}-color # line-size = 0; # Under-/overline pixel size. Может быть {overline,underline}-size # If you don't explicitly set the font-index for a tag, # the bar will iterate the font list and pick the first one that is able to draw the character font-0 = "JetBrainsMono Nerd Font"; modules-left = "bspwm title"; modules-center = "time"; modules-right = "cpu cpu-temp gpu-temp battery memory pulseaudio tray xkeyboard rofi"; # Restack the bar window and put it above the selected window manager's root # Fixes the issue where the bar is being drawn on top of fullscreen window's # Currently supported values: # generic (Tries the ewmh strategy and falls back to the bottom strategy. # This is a best-effort strategy and may change and be tweaked in # the future, the individual strategies are available on their own) # (New in version 3.6.0) # (Changed in version 3.7.0: Tries the ewmh strategy instead of just the bottom strategy) # bspwm (Moves the bar window above all bspwm root windows) # bottom (Moves the bar window above the first window in the window stack. # Works in xmonad, may not work on other WMs # New in version 3.7.0) # ewmh (Moves the bar above the window specified in _NET_SUPPORTING_WM_CHECK, if it is set # New in version 3.7.0) # i3 (requires `override-redirect = true`) wm-restack = "bspwm"; }; "module/rofi" = { type = "custom/text"; click-left = "exec rofi -show drun"; label = " "; }; "module/bspwm" = { # Воркспейсы bspwm type = "internal/bspwm"; pin-workspaces = true; # Only show workspaces defined on the same output as the bar inline-mode = true; # Output mode flags after focused state label. Не понял что значит enable-click = true; # Create click handler used to focus workspace enable-scroll = false; # Create scroll handlers used to cycle workspaces reverse-scroll = false; # Set the scroll cycle direction occupied-scroll = true; # Only scroll through occupied workspaces ws-icon-0 = "0;0"; ws-icon-1 = "1;1"; ws-icon-2 = "2;2"; ws-icon-3 = "3;3"; ws-icon-4 = "4;4"; ws-icon-5 = "5;5"; ws-icon-6 = "6;6"; ws-icon-7 = "7;7"; ws-icon-8 = "8;8"; ws-icon-9 = "9;9"; ws-icon-10 = "10;10"; format = " "; # Это невозможно описать. Я сам не до конца понял # label-mode = "%mode%"; # label-mode-padding = 1; # label-mode-background = gruvbox.red-alt; # label-mode-foreground = gruvbox.white; # label-separator = ""; # label-separator-padding = 0; # label-separator-foreground = gruvbox.transparen; # label-focused = "%icon% %name%"; # label-focused-font = 5; # label-focused-foreground = gruvbox.yellow; # label-focused-underline = "#565c64"; # label-focused-padding = 1; # label-focused-background = gruvbox.black; # label-occupied = "%icon%"; # label-occupied-foreground = "#646870"; # label-occupied-background = "#2b2f37"; # label-occupied-padding = 1; # label-empty = "%icon%"; # label-empty-foreground = gruvbox.yellow; # label-empty-padding = 1; # label-empty-background = "#2b2f37"; # label-unfocused = "%icon%"; # label-unfocused-font = 5; # label-unfocused-foreground = gruvbox.cream; # label-unfocused-background= gruvbox.black; # label-unfocused-padding = 2; # label-visible = "%icon%"; # label-visible-padding = 2; # label-urgent = "%icon%"; # label-urgent-font = 5 # label-urgent-foreground = gruvbox.red-alt; # label-urgent-background = gruvbox.black; # label-urgent-padding = 2; }; "module/title" = { # Отображение имени окна type = internal/xwindow; format-prefix = "  "; # format-prefix-foreground = gruvbox.yellow-mat; # format-prefix-background = gruvbox.black; # format-background = "#f00"; # format-foreground = "#000"; # format-padding = 4; # label = "%title%"; label = "%class%"; label-maxlen = 60; # label-foreground = gruvbox.cream; # label-background = gruvbox.dark; label-padding-left = 2; label-padding-right = 2; }; # %A: Полное название дня недели (например, "Monday") # %d: День месяца в формате двух цифр (например, "01") # %b или %B: Сокращённое или полное название месяца ("Jan", "January") # %m: Месяц в формате двух цифр (например, "01" для января) "module/time" = { type = "internal/date"; interval = 1; # format = "🕓