Poly Bar Configs

#Polybar for bspwm
#nord theme
nano ~/.config/polybar/config.ini

; ██████╗  ██████╗ ██╗  ██╗   ██╗██████╗  █████╗ ██████╗ 
; ██╔══██╗██╔═══██╗██║  ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║   ██║██║   ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║   ██║██║    ╚██╔╝  ██╔══██╗██╔══██║██╔══██╗
; ██║     ╚██████╔╝███████╗██║   ██████╔╝██║  ██║██║  ██║
; ╚═╝      ╚═════╝ ╚══════╝╚═╝   ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝
                                                       

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;    ____ ___  _     ___  ____  ____  
;   / ___/ _ \| |   / _ \|  _ \/ ___| 
;  | |  | | | | |  | | | | |_) \___ \ 
;  | |__| |_| | |__| |_| |  _ < ___) |
;   \____\___/|_____\___/|_| \_\____/ 
                                    
[colors]
background = #282e3a
background-alt = #d1c4e99
foreground = #e5e9f0
foreground-alt = #282e3a
primary = #ffb52a
secondary = #e60053
alert = #B48EAD

cyan = #88C0D0
aqua = #8FBCBB
red = #BF616A
yellow = #EBCB8B
green = #A3BE8C
orange = #D08770
magenta = #BF616A
white = #D8DEE9
pink = #C394B4
blue = #81a1c1
black = #3B4252

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[bar/example]
width = 100%
height = 20
radius = 0.0
fixed-center = true

background = ${colors.background}
foreground = ${colors.foreground}

padding-left = 0
padding-right = 0

border-size = 8
border-color = ${colors.background} 

module-margin-left = 0
module-margin-right = 0

font-0 = "Inconsolata CondensedBlack:size=13;3"
font-1 = "SauceCodePro Nerd Font Mono:size=22;6"
font-2 = "Material Icons:pixelsize=15;5"
font-3 = "Sinji:pixelsize=15;5"
font-4 = "Togalite medium:pixelsize=11;2"

; MODULES SETUP
modules-left = launcher left1 bspwm left2
modules-center = medium1 windowtitle medium2 sep
modules-right = right1 filesystem cpu memory volume date right2 shutdown

tray-position = right
tray-padding = 5
;tray-background = #0063ff

cursor-click = pointer
cursor-scroll = pointer

line-size = 2

;separator = %{F#4C566A}|%{F-}


[module/left1]
type = custom/text
content-foreground = ${colors.black}
content = " "

[module/left2]
type = custom/text
content-foreground = ${colors.black}
content = ""

[module/medium1]
type = custom/text
content-foreground = ${colors.black}
content = " "

[module/medium2]
type = custom/text
content-foreground = ${colors.black}
content = ""

[module/right1]
type = custom/text
content-foreground = ${colors.black}
content = " "

[module/right2]
type = custom/text
content-foreground = ${colors.black}
content = ""

[module/sep]
type = custom/text
content = " "

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[module/bspwm]
type = internal/bspwm
;ws-icon-0 = TERM;%{F#A3BE8C}
;ws-icon-1 = WEB;%{F#D08770}
;ws-icon-2 = CODE;%{F#81A1C1}﬏
;ws-icon-3 = MISC;%{F#EBCB8B}
;ws-icon-4 = EDIT;%{F#B48EAD}
;ws-icon-5 = CHAT;%{F#88C0D0}
;ws-icon-6 = DISCORD;%{F#D08770}ﭮ
;ws-icon-7 = MUSIC;%{F#A3BE8C}
;ws-icon-default = ♟

label-focused = "%name%"
label-focused-background = ${colors.black}
;label-focused-underline= ${colors.cyan}
label-focused-foreground = #88C0D0
label-focused-padding = 2

label-occupied = %name%
label-occupied-background = ${colors.black}
label-occupied-foreground = #D8DEE9
label-occupied-padding = 2

label-urgent = %name%
label-urgent-background = ${colors.black}
label-urgent-foreground = #BF616A
label-urgent-padding = 2

label-empty = %name% 
label-empty-background = ${colors.black}
label-empty-foreground = #2E3440
label-empty-padding = 2


; Separator in between workspaces
label-separator = 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[module/launcher]
type = custom/script
exec = echo 
;exec = echo 
interval = 100
label = "  %output%  "

;format-background = ${colors.white}
format-foreground = ${colors.blue}

click-left = $HOME/.config/bspwm/rofi/bin/launcher


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[module/kernel-name]
type = custom/script
exec = uname -r
interval = 10000
label = "    %output% "
format-foreground = ${colors.white}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[module/filesystem]
type = internal/fs


; Mountpoints to display
mount-0 = /

; Seconds to sleep between updates
; Default: 30
interval = 10

; Display fixed precision values
; Default: false
fixed-values = true

; Spacing between entries
; Default: 2
spacing = 4

; Available tags:
;   <label-mounted> (default)
;   <bar-free>
;   <bar-used>
;   <ramp-capacity>
format-mounted = <label-mounted>

; Available tags:
;   <label-unmounted> (default)
format-unmounted = <label-unmounted>

; Available tokens:
;   %mountpoint%
;   %type%
;   %fsname%
;   %percentage_free%
;   %percentage_used%
;   %total%
;   %free%
;   %used%
; Default: %mountpoint% %percentage_free%%
label-mounted = "    %percentage_used%% "

; Available tokens:
;   %mountpoint%
; Default: %mountpoint% is not mounted
label-unmounted = %mountpoint%: not mounted
label-unmounted-foreground = #55
label-unmounted-background = ${colors.black}
label-mounted-background = ${colors.black}

label-mounted-foreground = ${colors.blue}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[module/windowtitle]
type = internal/xwindow
format = <label>
format-background = ${colors.black}
format-foreground = ${colors.cyan}
format-padding = 1
label = "  %title%"
label-maxlen = 30
label-empty = "  "
label-separator = " "
label-empty-foreground = ${colors.cyan}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[module/volume]
type = internal/pulseaudio
format-volume =  "<ramp-volume> <label-volume>"
ramp-volume-0 ="    "
ramp-volume-0-font = 1
ramp-volume-1 ="   墳"
ramp-volume-1-font = 1
ramp-volume-2 ="   墳"
ramp-volume-2-font = 1
format-volume-background = ${colors.black}
format-volume-foreground = ${colors.cyan}
format-volume-padding = 1

format-muted = <label-muted>
format-muted-background = ${colors.black} 	
format-muted-foreground = ${colors.red}
label-muted ="   "
format-muted-font = 2

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[module/battery]
type = internal/battery
battery = BAT0
adapter = ADP1
full-at = 100

format-charging = <label-charging>
format-charging-prefix = " "
format-charging-prefix-font = 2
label-charging = "%percentage%%  " 

format-discharging = <label-discharging>
label-discharging = "%percentage%% "
format-discharging-prefix = " "
format-discharging-prefix-font = 2

format-discharging-background = ${colors.aqua}
format-discharging-foreground = ${colors.background}

format-charging-background = ${colors.orange}
format-charging-foreground = ${colors.background}

label-full = 
format-full-background = ${colors.green}
format-full-foreground = ${colors.background}
format-full-prefix-font = 1

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[module/network]
type = internal/network
interface = wlan0
format-connected = <label-connected>
format-connected-prefix = " "
format-connected-prefix-font = 2
label-connected = " %essid%%downspeed:9% "
label-connected-font = 1

format-disconnected = <label-disconnected>
label-disconnected = 
label-disconnected-font = 2

format-connected-background = ${colors.cyan}
format-connected-foreground = ${colors.background}
format-disconnected-background = ${colors.white}
format-disconnected-foreground = ${colors.background}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[module/memory]
type = internal/memory
; Seconds to sleep between updates
interval = 3

label = "    %percentage_used%%"

format-prefix-padding = 2
format-prefix-font = 2
format-prefix-foreground = #ffffff
format-background = ${colors.black}
format-foreground = ${colors.pink}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[module/wired-network]
type = internal/network
interface = enp2s0
interval = 3.0

udspeed-minwidth = 5

accumulate-stats = true
unknown-as-up = true

format-connected = <label-connected>
format-disconnected = <label-disconnected>

label-connected = "  %downspeed%  "
label-connected-foreground = ${colors.background}
label-connected-background = ${colors.green}

label-disconnected = "  "
label-disconnected-foreground = ${colors.background}
label-disconnected-background = ${colors.white}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[module/cpu]
type = internal/cpu

interval = 1
format = <label>
label = "    %percentage%% "

format-background = ${colors.black}
format-foreground = ${colors.yellow}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[module/date]
type = internal/date
interval = 1

date = 
date-alt = "  﨟  %A, %b %d -"

time = "    %H:%M "
time-alt = "%H:%M:%S "

;format-prefix = ""
format-prefix-padding = 1
format-prefix-font = 1
format-prefix-foreground = #ffffff
format-background = ${colors.black}
format-foreground = ${colors.white}

label = %date% %time%

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[module/shutdown]
type = custom/text
content = " "
;content-background = ${colors.black}
content-foreground = ${colors.red}
content-padding = 1
click-left = $HOME/.config/polybar/scripts/rofi-poweroff.sh
click-right = $HOME/.config/polybar/scripts/rofi-poweroff.sh 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
;pseudo-transparency = false

[global/wm]
;margin-top = 5
;margin-bottom = 5

; vim:ft=dosini



#launch
nano ~/.config/polybar/launch.sh

#!/usr/bin/env sh

## Add this to your wm startup file.

# Terminate already running bar instances
killall -q polybar

# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done

# Launch bar
polybar example -r -c ~/.config/polybar/config.ini &

2 Likes

Thanks… I copied it, reloaded , but now polybar disappeard xD lol

font has to be installed

Inconsolata CondensedBlack
SauceCodePro Nerd Font Mono
Material Icons
Sinji
Togalite medium

i use it now and it works

I changed font to mine, still doesnt display…hmm…I am noob for this lol

nano ~/.config/polybar/launch.sh

#!/usr/bin/env sh

## Add this to your wm startup file.

# Terminate already running bar instances
killall -q polybar

# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done

# Launch bar
polybar example -r -c ~/.config/polybar/config.ini &

and you have to use this font

Inconsolata CondensedBlack
SauceCodePro Nerd Font Mono
Material Icons
Sinji
Togalite medium
2 Likes
[bar/example]

idea :innocent:
it no just simple copy config some time … below eos community edition launch .sh ( you need change )

#!/usr/bin/env bash

# Terminate already running bar instances
killall -q polybar

# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done

# Launch Polybar
polybar top -c ~/.config/polybar/config.ini &

basic your config look for different name bar … it no work

2 Likes

hm…seems complicated … xD

maybe move topic to bspwm thread … @Elloquin

2 Likes

yeah, it will be great. Maybe some moderator watching this :slight_smile:

1 Like

All set I am always :eyes: :joy:

3 Likes

think rename u … eagle eye ell :rofl:

1 Like

Awesome , thank you @Elloquin

Btw, on reddit, I asked how to use someone’s configs, polybar etc, they said just copy paste in your bspwm folder…

Seems it is not correct way :frowning:

2 Likes

it is very easy to find a polybar config for bspwm on github
and use it
you can just copy and paste
must edit in config file etc font
and the font used in the config file they need to be installed

1 Like

@Brtza

different people set thing different . it no problem now you know

we all learn new thing daily :+1:

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.