Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- services.polybar = {
- enable = true;
- package = pkgs.polybar.override {
- #i3GapsSupport = true;
- #alsaSupport = true;
- #iwSupport = true;
- #githubSupport = true;
- i3Support = true;
- };
- script = ''
- MONITOR=DP-0 polybar --reload side &
- MONITOR=DVI-D-0 polybar --reload main &
- MONITOR=DVI-I-1 polybar --reload side &
- '';
- config = (let cfg = rec {
- "bar/main" = cfg."bar/side" //{
- tray-position = "right";
- tray-padding = "2";
- tray-background = "\${colors.background}";
- };
- "bar/side" = {
- monitor = "\${env:MONITOR:DP-0}";
- top = "true";
- width = "100%";
- height = "2%";
- #height = "20";
- radius = 0;
- modules-left= "i3";
- modules-center = "date";
- modules-right = "myVolume s memory cpu temperature s battery";
- };
- # "module/date" = {
- # type = "internal/date";
- # internal = 5;
- # date = "%d.%m.%y";
- # time = "%H:%M";
- # label = "%time% %date%";
- # };
- # "module/i3" = {
- # type = "internal/i3";
- #
- # };
- # "module/myBattery" = {
- # interval = "1";
- # type = "custom/script";
- # exec = "/home/timon/.config/i3blocks/battery";
- # format-underline = "#ffb52a";
- # };
- #};
- "colors" = {
- background = "#ee2f343f";
- background-alt = "#f72f343f";
- foreground = "#f3f4f5";
- foreground-alt = "#f3f4f5";
- foreground-dim = "#676e7d";
- primary = "#ffb52a";
- secondary = "#e60053";
- alert = "#ff6600";
- high = "#268bd2";
- high-alt = "#0c2b41";
- };
- "global/wm" = {
- margin-top = "4";
- margin-bottom = "0";
- };
- #"bar/main" = {
- # monitor = "\${env:MONITOR:DP-0}";
- # width = "100%";
- # height = "20";
- # offset-x = "0";
- # offset-y = "0";
- #
- # #;background = \${xrdb:color9}
- # background = "\${colors.background}";
- # foreground = "\${colors.foreground}";
- #
- # overline-size = "2";
- # overline-color = "#f00";
- # underline-size = "2";
- # underline-color = "\${colors.high}";
- #
- # line-size = "2";
- #
- # spacing = "1";
- # padding-left = "0";
- # padding-right = "2";
- # module-margin-left = "0";
- # module-margin-right = "1";
- #
- # font-0 = "Roboto:pixelsize=8;0";
- # font-1 = "FontAwesome:pixelsize=8 ;-2";
- # #;font-2 = unifont:size=6:heavy:fontformat=truetype;-2
- # #;font-3 = siji:pixelsize=10;-4
- #
- #
- # modules-left = "i3";
- # modules-center = "date";
- # #;modules-right = "myVolume s wlan eth s memory cpu myLoad temperature s battery";
- # #modules-right = "myVolume s wlan eth s memory cpu temperature s battery";
- # modules-right = "myVolume s eth s memory cpu temperature";
- # #;systemRoot systemHome s
- #
- #
- # wm-restack = "i3";
- #
- # #;override-redirect = "true";
- #
- #
- # #;scroll-up = "i3wm-wsnext";
- # #;scroll-down = i3wm-wsprev
- #};
- "module/i3" = {
- type = "internal/i3";
- format = "<label-state> <label-mode>";
- index-sort = "true";
- label-mode = "%mode%";
- label-mode-padding = "2";
- label-mode-foreground = "#000";
- label-mode-background = "\${colors.primary}";
- label-focused = "%index%";
- label-focused-background = "\${colors.background-alt}";
- label-focused-underline = "\${colors.high}";
- label-focused-padding = "4";
- label-unfocused = "%index%";
- label-unfocused-foreground = "\${colors.foreground-dim}";
- label-unfocused-padding = "4";
- label-urgent = "%index%";
- label-urgent-background = "\${colors.alert}";
- label-urgent-padding = "4";
- label-visible = "%index%";
- label-visible-foreground = "2";
- label-visible-padding = "2";
- };
- "module/theme" = {
- format-background = "\${colors.background}";
- format-padding = "2";
- format-foreground = "\${self.format-underline}";
- format-connected-background = "\${module/theme.format-background}";
- format-unconnected-background = "\${module/theme.format-background}";
- format-mounted-background = "\${module/theme.format-background}";
- format-unmounted-background = "\${module/theme.format-background}";
- format-charging-background = "\${module/theme.format-background}";
- format-discharging-background = "\${module/theme.format-background}";
- format-connected-padding = "\${module/theme.format-padding}";
- format-unconnected-padding = "\${module/theme.format-padding}";
- format-mounted-padding = "\${module/theme.format-padding}";
- format-unmounted-padding = "\${module/theme.format-padding}";
- format-charging-padding = "\${module/theme.format-padding}";
- format-discharging-padding = "\${module/theme.format-padding}";
- format-mounted-foreground = "\${self.format-mounted-underline}";
- format-unmounted-foreground = "\${self.format-unmounted-underline}";
- };
- "module/mpd" = {
- type = "internal/mpd";
- "inherit" = "module/theme";
- format-online = "<toggle> <label-song> [ <label-time> ]";
- label-song = "%title% - %artist%";
- label-song-maxlen = "25";
- label-song-ellipsis = "true";
- icon-prev = "";
- icon-seekb = "";
- icon-stop = "";
- icon-play = "";
- icon-pause = "";
- icon-next = "";
- icon-seekf = "";
- icon-random = "";
- icon-repeat = "";
- #;toggle-on-foreground = "\${colors.primary}";
- #;toggle-off-foreground = "#66";
- #;format-online-prefix = " ";
- format-online-underline = "#20dfdf";
- format-online-background = "#0d5959";
- format-online-padding = "4";
- };
- "module/myBattery" = {
- interval="1";
- type = "custom/script";
- exec = "/home/timon/.config/i3blocks/battery";
- format-underline = "#ffb52a";
- };
- "module/mySpotify" = {
- "inherit" = "module/theme";
- interval = "1";
- type = "custom/script";
- exec = "/home/timon/.config/i3blocks/mediaplayer";
- click-left = "i3-msg workspace number 9";
- label = "%output:0:30:...%";
- format-prefix = " ";
- format-underline = "#20dfdf";
- format-foreground = "\${colors.foreground}";
- format-background = "#0d5959";
- };
- "module/myVolume" = {
- "inherit" = "module/theme";
- interval = "0.5";
- type = "custom/script";
- exec = "/home/timon/.config/i3blocks/volume";
- scroll-up = "pactl set-sink-volume 1 +1%";
- scroll-down = "pactl set-sink-volume 1 -1%";
- click-left = "urxvt -name float -e ncmpcpp &";
- click-right = "pavucontrol &";
- format-prefix = "";
- format-underline = "#20dfdf";
- };
- "module/myLoad" = {
- "inherit" = "module/theme";
- interval = "1";
- type = "custom/script";
- exec = "/home/timon/.config/i3blocks/load_average";
- click-left = "urxvt -name float -e htop &";
- format-underline = "#d33636";
- };
- "module/systemRoot" = {
- "inherit" = "module/theme";
- type = "internal/fs";
- interval = "20";
- mount-0 = "/";
- label-mounted = " %free%";
- label-unmounted = " ??";
- format-mounted-underline = "#39c639";
- format-unmounted-underline = "#39c639";
- };
- "module/systemHome" = {
- "inherit" = "module/theme";
- type = "internal/fs";
- interval = "20";
- format-prefix = "";
- mount-0 = "/home";
- label-mounted = " %free%";
- label-unmounted = " ??";
- format-mounted-underline = "#39c639";
- format-unmounted-underline = "#39c639";
- };
- "module/backlight" = {
- type = "internal/xbacklight";
- format = "<label> <bar>";
- label = "BL";
- bar-width = "10";
- bar-indicator = "│";
- bar-indicator-foreground = "#ff";
- bar-indicator-font = "2";
- bar-fill = "─";
- bar-fill-font = "2";
- bar-fill-foreground = "#9f78e1";
- bar-empty = "─";
- bar-empty-font = "2";
- bar-empty-foreground = "\${colors.foreground-alt}";
- };
- "module/cpu" = {
- "inherit" = "module/theme";
- type = "internal/cpu";
- interval = "2";
- format-prefix = " ";
- format-underline = "#d33636";
- label = "%percentage%";
- };
- "module/memory" = {
- "inherit" = "module/theme";
- type = "internal/memory";
- interval = "2";
- format-prefix = " ";
- format-underline = "#999999";
- label = "%gb_used%";
- };
- "module/wlan" = {
- "inherit" = "module/theme";
- type = "internal/network";
- interface = "wlo1";
- interval = "1";
- format-connected = "<label-connected>";
- format-connected-underline = "#268bd2";
- format-disconnected-underline = "\${colors.alert}";
- #;label-connected = " %local_ip% %signal% %downspeed% %upspeed%";
- label-connected = " %signal% [ %downspeed% ] [ %upspeed% ]";
- label-disconnected = "OFFLINE";
- label-connected-foreground = "\${colors.high}";
- label-disconnected-foreground = "\${colors.alert}";
- ramp-signal-0 = "";
- ramp-signal-1 = "";
- ramp-signal-2 = "";
- ramp-signal-3 = "";
- ramp-signal-4 = "";
- ramp-signal-foreground = "\${colors.foreground-alt}";
- };
- "module/eth" = {
- "inherit" = "module/theme";
- type = "internal/network";
- #;interface = "eth0";
- interface = "eno1";
- interval = "3.0";
- format-connected-underline = "#55aa55";
- format-connected-prefix = " ";
- format-connected-foreground-foreground = "\${colors.foreground-alt}";
- label-connected = "%local_ip%";
- format-disconnected-underline = "\${self.format-connected-underline}";
- label-disconnected = "%ifname% disconnected";
- label-disconnected-foreground = "\${colors.foreground-alt}";
- };
- "module/date" = {
- "inherit" = "module/theme";
- type = "internal/date";
- interval = "1";
- time = "%Y - %m - %d %a %H : %M : %S";
- time-alt = "%Y-%m-%d %a %H:%M:%S";
- format-prefix = " ";
- format-underline = "\${colors.foreground}";
- label = "%date% %time%";
- };
- "module/volume" = {
- "inherit" = "module/theme";
- type = "internal/volume";
- format-volume = "<label-volume> <bar-volume>";
- label-volume = "VOL";
- label-volume-foreground = "\${root.foreground}";
- format-muted-prefix = " ";
- format-muted-foreground = "\${colors.foreground-alt}";
- label-muted = "sound muted";
- bar-volume-width = "10";
- bar-volume-foreground-0 = "#55aa55";
- bar-volume-foreground-1 = "#55aa55";
- bar-volume-foreground-2 = "#55aa55";
- bar-volume-foreground-3 = "#55aa55";
- bar-volume-foreground-4 = "#55aa55";
- bar-volume-foreground-5 = "#f5a70a";
- bar-volume-foreground-6 = "#ff5555";
- bar-volume-gradient = "false";
- bar-volume-indicator = "│";
- bar-volume-indicator-font = "2";
- bar-volume-indicator-foreground = "#ff";
- bar-volume-fill = "─";
- bar-volume-fill-font = "2";
- bar-volume-empty = "─";
- bar-volume-empty-font = "2";
- bar-volume-empty-foreground = "\${colors.foreground-alt}";
- };
- "module/battery" = {
- "inherit" = "module/theme";
- type = "internal/battery";
- battery = "BAT0";
- adapter = "ADP1";
- full-at = "98";
- label-charging = " %percentage% [%time%]";
- format-charging = "<animation-charging> <label-charging>";
- format-charging-underline = "#ffb52a";
- label-discharging = "%percentage% [%time%]";
- format-discharging = "<ramp-capacity> <label-discharging>";
- format-discharging-underline = "\${self.format-charging-underline}";
- label-charging-foreground = "\${self.format-charging-underline}";
- label-discharging-foreground = "\${self.format-charging-underline}";
- format-full-prefix = " ";
- format-full-prefix-foreground = "\${colors.foreground-alt}";
- format-full-underline = "\${self.format-charging-underline}";
- ramp-capacity-0 = "";
- ramp-capacity-1 = "";
- ramp-capacity-2 = "";
- ramp-capacity-3 = "";
- ramp-capacity-4 = "";
- ramp-capacity-foreground = "\${self.format-charging-underline}";
- ramp-capacity-0-foreground = "\${colors.foreground}";
- ramp-capacity-0-background = "\${colors.alert}";
- animation-charging-0 = "";
- animation-charging-1 = "";
- animation-charging-foreground = "\${self.format-charging-underline}";
- animation-charging-framerate = "750";
- };
- "module/temperature" = {
- "inherit" = "module/theme";
- type = "internal/temperature";
- thermal-zone = "0";
- warn-temperature = "65";
- format = "<label>";
- format-underline = "#d33636";
- format-warn = "<label-warn>";
- format-warn-underline = "\${self.format-underline}";
- label = "%temperature%";
- label-warn = "%temperature%";
- format-warn-foreground = "\${colors.foreground}";
- format-warn-background = "\${colors.alert}";
- format-warn-padding = "\${self.format-padding}";
- ramp-0 = "";
- ramp-1 = "";
- ramp-2 = "";
- ramp-foreground = "\${colors.foreground-alt}";
- };
- "module/powermenu" = {
- type = "custom/menu";
- label-open = " power";
- label-open-foreground = "\${colors.secondary}";
- label-close = " cancel";
- label-close-foreground = "\${colors.secondary}";
- label-separator = "|";
- label-separator-foreground = "\${colors.foreground-alt}";
- menu-0-0 = "reboot";
- menu-0-0-exec = "menu-open-1";
- menu-0-1 = "power off";
- menu-0-1-exec = "menu-open-2";
- menu-1-0 = "cancel";
- menu-1-0-exec = "menu-open-0";
- menu-1-1 = "reboot";
- menu-1-1-exec = "sudo reboot";
- menu-2-0 = "power off";
- menu-2-0-exec = "sudo poweroff";
- menu-2-1 = "cancel";
- menu-2-1-exec = "menu-open-0";
- #; vim:ft=d"osini";
- };
- "module/s" = {
- type = "custom/text";
- content = " ";
- };
- }; in cfg);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement