Polybar on i3 instead of i3block -errors

Hi,

I am just playing with the bars on my i3.
Finally I got how to edit i3block but it is still looks older than polybar.

Polybar has some “modern” look.

So I wanted to use polybar instead of blocks.
But but , I got some weird errors.

What I did, cloned polybar setup from bspwm. and added in my i3 config this :

Polybar
exec_always --no-startup-id ~/.config/polybar/launch.sh

As you can see here some errors.

Here is my config of i3 :


# iconic font icon search: https://fontawesome.com/v4.7/cheatsheet/
#
# --> to update this run the following command (will backup existing setup file)
# wget --backups=1 https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/main/.config/i3/config -P ~/.config/i3/
#
# Endeavouros-i3 config file
# Source for complete framework of our i3 config and theming here: https://github.com/endeavouros-team/endeavouros-i3wm-setup
# EndeavourOS wiki holds some Information also: https://discovery.endeavouros.com/window-tiling-managers/i3-wm/
# Please see http://i3wm.org/docs/userguide.html for the official i3 reference!

#######################
# config starts here: #
#######################

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
font pango:Noto Sans Regular 10

# set the mod key to the winkey:
set $mod Mod4

#####################
# workspace layout: #
#####################

# default i3 tiling mode:
workspace_layout default

# i3 stacking layout:
# Each window will be fullscreen and tabbed top to bottom.
#workspace_layout stacking

# i3 tabbed layout:
# Each new window will open fullscreen as a tab (left to right)
#workspace_layout tabbed

##############################
# extra options for windows: #
##############################

#border indicator on windows: 
new_window pixel 1

# thin borders
# hide_edge_borders both

# Set inner/outer gaps
gaps inner 6
gaps outer 3



# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

# switch to workspace
bindsym $mod+1    workspace  $ws1
bindsym $mod+2    workspace  $ws2
bindsym $mod+3    workspace  $ws3
bindsym $mod+4    workspace  $ws4
bindsym $mod+5    workspace  $ws5
bindsym $mod+6    workspace  $ws6
bindsym $mod+7    workspace  $ws7
bindsym $mod+8    workspace  $ws8
bindsym $mod+9    workspace  $ws9
bindsym $mod+0    workspace  $ws10


# move focused container to workspace
bindsym $mod+Shift+1    move container to workspace  $ws1
bindsym $mod+Shift+2    move container to workspace  $ws2
bindsym $mod+Shift+3    move container to workspace  $ws3
bindsym $mod+Shift+4    move container to workspace  $ws4
bindsym $mod+Shift+5    move container to workspace  $ws5
bindsym $mod+Shift+6    move container to workspace  $ws6
bindsym $mod+Shift+7    move container to workspace  $ws7
bindsym $mod+Shift+8    move container to workspace  $ws8
bindsym $mod+Shift+9    move container to workspace  $ws9
bindsym $mod+Shift+0    move container to workspace  $ws10


# resize window (you can also use the mouse for that):
#mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window’s width.
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
#        bindsym j resize shrink width 10 px or 10 ppt
#        bindsym k resize grow height 10 px or 10 ppt
#        bindsym l resize shrink height 10 px or 10 ppt
#        bindsym ntilde resize grow width 10 px or 10 ppt

# same bindings, but for the arrow keys
#	bindsym Left resize shrink width 10 px or 10 ppt
#        bindsym Down resize grow height 10 px or 10 ppt
#        bindsym Up resize shrink height 10 px or 10 ppt
#        bindsym Right resize grow width 10 px or 10 ppt

# back to normal: Enter or Escape
#	bindsym Return mode "default"
#        bindsym Escape mode "default"
#}

#bindsym $mod+r mode "resize"

######################################
# keybindings for different actions: #
######################################

# start a terminal
bindsym $mod+Return exec xfce4-terminal

# kill focused window
bindsym $mod+c kill

# exit-menu
bindsym $mod+Shift+e exec ~/.config/i3/scripts/powermenu

# Lock the system
# lock with a picture:
#bindsym $mod+l exec i3lock -i  ~/.config/i3/i3-lock-screen.png -p default|win -t
# lock by blurring the screen:
bindsym $mod+l exec ~/.config/i3/scripts/blur-lock.sh

# reload the configuration file
bindsym $mod+Shift+c reload

# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart

# keybinding list in editor:
bindsym $mod+F1 exec xed ~/.config/i3/keybindings

# Backlight control
bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym XF86MonBrightnessUp exec brightnessctl set +5%

# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+b focus up
bindsym $mod+o focus right

# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+b move up
bindsym $mod+Shift+o move right

# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

# split in horizontal orientation
bindsym $mod+h split h

# split in vertical orientation
bindsym $mod+v split v

# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle

# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+g layout tabbed
bindsym $mod+e layout toggle split

# toggle tiling / floating
bindsym $mod+Shift+space floating toggle

# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle

# focus the parent container
bindsym $mod+a focus parent

# open new empty workspace
bindsym $mod+Shift+n exec ~/.config/i3/scripts/empty_workspace.sh

## Multimedia Keys

# volume
bindsym XF86AudioRaiseVolume exec amixer -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks
bindsym XF86AudioLowerVolume exec amixer -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks


# Pulse Audio controls

#volume up
#bindsym XF86AudioRaiseVolume exec pamixer -i 5 --allow-boost && dunstify -h string:x-dunst-stack-tag:volume volume: $(pamixer --get-volume)%
#volume down
#bindsym XF86AudioLowerVolume exec pamixer -d 5 --allow-boost && dunstify -h string:x-dunst-stack-tag:volume volume: $(pamixer --get-volume)%
#mute
#bindsym XF86AudioMute exec pamixer -t && dunstify -h string:x-dunst-stack-tag:mute mute: $(pamixer --get-mute)!

# gradular volume control
bindsym $mod+XF86AudioRaiseVolume exec amixer -D pulse sset Master 1%+ && pkill -RTMIN+1 i3blocks
bindsym $mod+XF86AudioLowerVolume exec amixer -D pulse sset Master 1%- && pkill -RTMIN+1 i3blocks

# mute
#bindsym XF86AudioMute exec amixer sset Master toggle && killall -USR1 i3blocks
#mute
bindsym XF86AudioMute exec pamixer -t && notify-send "mute: $(pamixer --get-mute)"

bindsym XF86AudioPlay exec playerctl play
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous

# Redirect sound to headphones
bindsym $mod+p exec /usr/local/bin/switch-audio-port

## App shortcuts
bindsym $mod+w exec /usr/bin/firefox
bindsym $mod+n exec /usr/bin/thunar
bindsym Print exec "scrot ~/%Y-%m-%d-%T-screenshot.png"

##########################################
# configuration for workspace behaviour: #
##########################################

# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1:"
set $ws2 "2:"
set $ws3 "3:"
set $ws4 "4:"
set $ws5 "5:"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"

# use workspaces on different displays:
# where you have to replace VGA-0/HDMI-0 with the names for your displays 
# you can get from xrandr command
#workspace $ws1 output VGA-0
#workspace $ws2 output VGA-0
#workspace $ws3 output HDMI-0
#workspace $ws4 output HDMI-0
#workspace $ws5 output HDMI-0

# bind program to workspace and focus to them on startup:
assign [class="Xfce4-terminal"] $ws1
assign [class="(?i)firefox"] $ws2
assign [class="Thunar"] $ws3
assign [class="Thunderbird"] $ws4
assign [class="TelegramDesktop"] $ws5


# automatic set focus new window if it opens on another workspace then the current:
for_window [class=Xfce4-terminal] focus
for_window [class=(?i)firefox] focus
for_window [class=Thunar] focus
for_window [class=Thunderbird] focus
for_window [class=TelegramDesktop] focus

#############################################
# autostart applications/services on login: #
#############################################

#get auth work with polkit-gnome
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1

# dex execute .desktop files
# keep in mind that it can cause issues 
# when second to i3 a DE is installed or mixed usage of i3 + xfce4 or GNOME
# in this cases better disable dex and use manual starting apps using xdg/autostart
exec --no-startup-id dex -a -s /etc/xdg/autostart/:~/.config/autostart/

# num lock activated
#exec --no-startup-id numlockx on

# start conky: 
#exec_always --no-startup-id conky

Polybar
exec_always --no-startup-id ~/.config/polybar/launch.sh

# start a script to setup displays
# uncomment the next line, use arandr to setup displays and save the file as monitor:
exec --no-startup-id ~/.screenlayout/monitor.sh

# start blueberry app for managing bluetooth devices from tray:
exec --no-startup-id blueberry-tray

#transparency 
#exec --no-startup-id xcompmgr -c -C -t-5 -l-5 -r4.2 -o.55 &
exec --no-startup-id picom -CGb

#networkmanager-applet
exec --no-startup-id nm-applet

# set wallpaper
exec --no-startup-id nitrogen --restore
#exec --no-startup-id feh --bg-fill /usr/share/endeavouros/backgrounds/endeavouros_i3.png

#set powersavings for display:
exec --no-startup-id xset s 480 dpms 600 600 600

# Desktop notifications
exec --no-startup-id dbus-launch dunst --config ~/.config/dunst/dunstrc

# Autostart apps as you like
#exec --no-startup-id sleep 2 && xfce4-terminal
#exec --no-startup-id sleep 7 && firefox https://github.com/endeavouros-team/endeavouros-i3wm-setup/blob/main/force-knowledge.md
#exec --no-startup-id sleep 3 && thunar

# set floating (nontiling)for apps needing it
for_window [class="Yad" instance="yad"] floating enable
for_window [class="Galculator" instance="galculator"] floating enable
for_window [class="Blueberry.py" instance="blueberry.py"] floating enable

#set floating (nontiling) for special apps
for_window [class="Xsane" instance="xsane"] floating enable
for_window [class="Pavucontrol" instance="pavucontrol"] floating enable
for_window [class="qt5ct" instance="qt5ct"] floating enable
for_window [class="Blueberry.py" instance="blueberry.py"] floating enable
for_window [class="Bluetooth-sendto" instance="bluetooth-sendto"] floating enable
for_window [class="Pamac-manager"] floating enable

######################################
# color settings for bar and windows #
######################################
 
# Define colors variables: 
set $darkbluetrans	#08052be6
set $darkblue		#08052b
set $lightblue		#5294e2
set $urgentred		#e53935
set $white		#ffffff
set $black		#000000
set $purple		#e345ff
set $darkgrey		#383c4a
set $grey		#b0b5bd
set $mediumgrey		#8b8b8b
set $yellowbrown	#e1b700

# define colors for windows:
#class		        	border		bground		text		indicator	child_border
client.focused		    $lightblue	$darkblue	$white		$purple		$mediumgrey
client.unfocused	    $darkblue	$darkblue	$grey		$purple		$darkgrey
client.focused_inactive	$darkblue	$darkblue	$grey		$purple		$black
client.urgent		    $urgentred	$urgentred	$white		$purple		$yellowbrown


############################################
# bar settings (input comes from i3blocks) #
############################################

# Start i3bar to display a workspace bar 
# (plus the system information i3status finds out, if available)
bar {
		font pango:Noto Sans Regular 10, FontAwesome 10
		status_command i3blocks -c ~/.config/i3/i3blocks.conf
	    	position top 
#	    	i3bar_command i3bar --transparency
# it could be that you have no primary display set: set one (xrandr --output <output> --primary)
# reference: https://i3wm.org/docs/userguide.html#_tray_output
		    tray_output primary
		    tray_padding 0

# When strip_workspace_numbers is set to yes, 
# any workspace that has a name of the form 
# “[n][:][NAME]” will display only the name.
strip_workspace_numbers yes
##strip_workspace_name no

		    colors {
		    separator          $purple
		    background         $darkgrey
		    statusline         $white
#                          		border 		        bg		txt		indicator
		focused_workspace	$mediumgrey	   	$grey		$darkgrey	$purple
		active_workspace	$lightblue      	$mediumgrey	$darkgrey	$purple
		inactive_workspace	$darkgrey   		$darkgrey	$grey		$purple
		urgent_workspace	$urgentred	    	$urgentred	$white		$purple 
	}
}

# you can add different bars for multidisplay setups on each display:
# set output HDMI-0 to the display you want the bar, --transparency can be set.
# Transparency needs rgba color codes to be used where the last two letters are the transparency factor see here:
# https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4
# #08052be6 --> e6=90%

# bar {	
#	font pango:Noto Sans Regular 9, FontAwesome 9
#	status_command i3blocks -c ~/.config/i3/i3blocks-2.conf
#	i3bar_command i3bar --transparency
#	output HDMI-0
#	position bottom
#
# When strip_workspace_numbers is set to yes, 
# any workspace that has a name of the form 
# “[n][:][NAME]” will display only the name.
#strip_workspace_numbers yes
##strip_workspace_name no
#
#	colors {
#		separator          $purple
#		background         $darkbluetrans
#        	statusline         $white
#					border		bg		txt		indicator
#		focused_workspace	$lighterblue	$lighterblue	$darkblue	$purple
#		active_workspace	$lightdblue	$lightdblue	$darkblue	$purple
#		inactive_workspace	$darkblue	$darkblue	$lightdblue	$purple
#		urgent_workspace	$urgentred	$urgentred	$white		$purple 
#	}
#}

#####################################
# Application menu handled by rofi: #
#####################################

bindsym $mod+d exec rofi -modi drun -show drun \
		-config ~/.config/rofi/rofidmenu.rasi
		
## rofi bindings for window menu (two bindings F10/$mod+t)

bindsym $mod+t exec rofi -show window \
		-config ~/.config/rofi/rofidmenu.rasi

What I am missing ? probably a lot ? xD

good place for start … wiki your friend

" https://github.com/polybar/polybar/wiki "

  • i point in direction

#bar {
#    status_command i3blocks -c ~/.config/i3/i3blocks.conf
#    tray_output none 
#    position top
#    colors {
#     separator          #666666
#       background         #0a090a
#       statusline         #dddddd
#       focused_workspace  #743594 #743594 #ffffff
#       active_workspace   #333333 #0a090a #ffffff
#       inactive_workspace #222222 #0a090a #888888
#       urgent_workspace   #2f343a #900000 #ffffff
#   }
#} 

above example ( no same your )

  • look your polybar line in i3 config … :wink: #
3 Likes

just wanted to mention you here @Shjim and a second later you are in already on your own :sunglasses:

1 Like

ok, I need to remove i3 bar like this.

and remove these

bar {
i3bar_command i3bar
}

better # out

  • look at this in config
wm-restack = bspwm
;wm-restack = i3

EDit … if want bspwm polybar… will need all font that used . info on page you clone from

if me … better start fresh use example on Polybar github . learn more that way

1 Like

ok, thanks I will try both options :slight_smile:

1 Like

if i3 … use i3 … if bspwm … use bspwm

1 Like

@Brtza If you’re still having issues, you can ping me. I wrote that polybar config, and I use it with i3wm :wink:

1 Like

Here’s an issue btw in your i3wm config

Comment out “Polybar”. (the error screenshot you post is telling this :wink: )
So it looks like

# Polybar
exec_always --no-startup-id ~/.config/polybar/launch.sh
1 Like

pointed that out … no think noticed ( it easy mistake to make )

1 Like

I got it…polybar working fine, no errors while removing i3blocks.

And now, biggest problem, how to edit polybar xD

I tried copy paste some of them from reddit, but without success

You can always drop me a message for help with polybar. :wink:
There are no stupid questions :crazy_face:

I suggest copy pasting from polybar wiki when you are starting out

2 Likes

Thanks for your help.
I will try first without you, need to learn, haha.

Last time I broke my system 3 times, don’t know how. But I can always switch back to KDE :stuck_out_tongue:

2 Likes

Need small help :smiley: with polybar

I don’t know why left upper corner doesn’t show anything ( number, symbol etc) for different workspace.
I tried set different options, but without luck.

Btw, how to put menu (Rofi) there also ?

2021-11-25-18:16:11-screenshot

Here is mine config file


;==========================================================
;
; THIS IS AN EXAMPLE CONFIGURATION FILE!
; IT IS NOT SUPPOSED TO WORK OUT OF THE BOX SINCE IS CONTAINS
; SETTINGS THAT ARE SPECIFIC TO THE MACHINE WHICH WAS USED
; TO GENERATE IT.
; Please refer to the web documentation hosted at:
; https://github.com/polybar/polybar#configuration
; and
; https://github.com/polybar/polybar/wiki/Configuration
; if you want to automatically generate one for you.
;
;==========================================================
;
;
;   ██████╗  ██████╗ ██╗  ██╗   ██╗██████╗  █████╗ ██████╗
;   ██╔══██╗██╔═══██╗██║  ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
;   ██████╔╝██║   ██║██║   ╚████╔╝ ██████╔╝███████║██████╔╝
;   ██╔═══╝ ██║   ██║██║    ╚██╔╝  ██╔══██╗██╔══██║██╔══██╗
;   ██║     ╚██████╔╝███████╗██║   ██████╔╝██║  ██║██║  ██║
;   ╚═╝      ╚═════╝ ╚══════╝╚═╝   ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝
;
;
;   To learn more about how to configure Polybar
;   go to https://github.com/polybar/polybar
;
;   The README contains a lot of information
;
;==========================================================

[colors]
background = #292D3E
second-background = #34324A
foreground = #A6ACCD
selection-background = #484f72
selection-foreground = #FFFFFF
comment = #676E95
cyan = #89DDFF
green = #C3E88D
orange = #F78C6C
purple = #C792EA
red = #F07178
yellow = #FFCB6B
blue = #82AAFF
gray = #676E95
error = #FF5370
links = #80CBC4

[bar/main]
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
height = 32
;offset-x = 1%
;offset-y = 1%
radius = 0
fixed-center = true

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

border-size = 0
border-color = #00000000

font-0 = "Liga SFMono Nerd Font:size=10;2"
font-1 = FontAwesome:size=10;2
font-2 = MaterialIcons:size=10;2
font-3 = "SF Pro:size=10;2"

modules-left = i3
modules-center = date
modules-right = pulseaudio battery cpu memory temperature

separator = |
separator-foreground = ${colors.comment}

locale = hr_HR.UTF-8

tray-position = right
tray-padding = 2
tray-background = ${colors.second-background}

;wm-restack = bspwm
;wm-restack = i3

;override-redirect = true

;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev

;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev

cursor-click = pointer
cursor-scroll = ns-resize

[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%

[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock

format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-prefix-underline = ${colors.secondary}

label-layout = %layout%
label-layout-underline = ${colors.secondary}

label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}

[module/filesystem]
type = internal/fs
interval = 25

mount-0 = /

label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground-alt}

[module/bspwm]
type = internal/bspwm

label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2

label-occupied = %index%
label-occupied-padding = 2

label-urgent = %index%!
label-urgent-background = ${colors.alert}
label-urgent-padding = 2

label-empty = %index%
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 2

; Separator in between workspaces
; label-separator = |

[module/i3]
type = internal/i3
format = <label-state>
format-font = 2
index-sort = true
wrapping-scroll = false

ws-icon-0 = 1;1
ws-icon-1 = 2; 
ws-icon-2 = 3; 
ws-icon-3 = 4;4
ws-icon-4 = 5;5
ws-icon-5 = 6;6
ws-icon-6 = 7;7
ws-icon-7 = 8; 
ws-icon-8 = 9; 
ws-icon-9 = 10; 
ws-icon-default =  

; Only show workspaces on the same output as the bar
;pin-workspaces = true

label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.selection}

; focused = Active workspace on focused monitor
label-focused = "%icon%"
label-focused-background = ${colors.selection-background}
label-focused-padding = 4

; unfocused = Inactive workspace on any monitor
label-unfocused = %icon%
label-unfocused-padding = 4

; visible = Active workspace on unfocused monitor
label-visible = %icon%
label-visible-background = ${colors.second-background}
label-visible-underline = ${colors.foreground}
label-visible-padding = 2

; urgent = Workspace with urgency hint set
label-urgent = %icon%
label-urgent-background = ${colors.error}
label-urgent-padding = 4

; Separator in between workspaces
; label-separator = |


[module/brightnessctl]
type = internal/brightnessctl

format = <label> <bar>
label = BL

bar-width = 10
bar-indicator = |
bar-indicator-foreground = #fff
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/backlight-acpi]
#inherit = module/backlight
type = internal/backlight
card = amdgpu_bl0

[module/cpu]
type = internal/cpu
interval = 1
format-prefix = "  "
format-prefix-foreground = ${colors.orange}
format-underline = #f90000
label = %percentage-sum%
format-padding = 2

[module/memory]
type = internal/memory
interval = 1
format-padding = 2
format-prefix = "  "
format-prefix-foreground = ${colors.links}
label = RAM %gb_used%/%gb_free%

[module/wlan]
type = internal/network
interface = wlo1
interval = 3.0

format-connected = <ramp-signal> <label-connected>
format-connected-underline = #9f78e1
label-connected = %essid%

format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}

ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
ramp-signal-foreground = ${colors.foreground-alt}

[module/eth]
type = internal/network
interface = enp0s31f6
interval = 3.0

format-connected-underline = #55aa55
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %local_ip%

format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}

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

date = " %d/%m/%Y"

time = %H:%M:%S

format-prefix = " "
format-padding = 0
format-font = 4

label = %time% %date% 

[module/pulseaudio]
type = internal/pulseaudio
click-right = pavucontrol

format-volume = <ramp-volume>  <label-volume> 
format-volume-padding = 2
format-volume-font = 1
label-volume = %percentage%%

ramp-volume-0 =  
ramp-volume-foreground = ${colors.purple}

label-muted =  
label-muted-foreground = ${colors.comment}
label-muted-padding = 2
label-muted-font = 1

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-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}

[module/alsa]
type = internal/alsa

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-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}

[module/battery]
type = internal/battery
battery = BAT0
adapter = AC
full-at = 99

label-font = 1

format-charging-prefix = " "
format-charging-prefix-foreground = ${colors.yellow}
format-charging-padding = 2

format-discharging-prefix = "  "
format-discharging-prefix-foreground = ${colors.cyan}
format-discharging-padding = 2

format-full-prefix = "  "
format-full-prefix-foreground = ${colors.green}
format-full-padding = 2

[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 70

format = <label>
format-padding = 2
format-prefix = " "
format-prefix-foreground = ${colors.yellow}
format-warn = <label-warn>
format-warn-prefix = " "
format-warn-prefix-foreground = ${colors.red}

label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.red}

ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-foreground = ${colors.foreground-alt}

[module/powermenu]
type = custom/menu

expand-right = true

format-spacing = 1

label-open = 
label-open-foreground = ${colors.red}
label-close =  cancel
label-close-foreground = ${colors.red}
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

[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

Most certainly, you don’t have the right fonts. Terminal output when running polybar will help pin point it. (I described the whole process in your DM :wink: )

sudo pacman otf-font-awesome

For material icons, I don’t have original source, but the ttf file is here : https://www.dropbox.com/s/ol272zhdjait88y/material-design-icons.ttf?dl=0

Other two fonts - you can get it from the github repo. Place these two fonts and material font inside ~/.fonts. Then update font cache.

fc-cache -frv

Reload polybar, and you should get icons.

image

1 Like

Hi,

Yes, i followed your instructions and installed all fonts. But I will check double ofc.

Here is from terminal :

[marko@SoSmooth polybar]$ polybar main -c config
notice: Parsing config file: config
notice: pulseaudio: using default sink alsa_output.pci-0000_04_00.6.analog-stereo
notice: Loaded font "Liga SFMono Nerd Font:size=10" (name=Liga SFMono Nerd Font, offset=2, file=/home/marko/.local/share/fonts/LigaSFMonoNerdFont-Regular.otf)
notice: Loaded font "FontAwesome:size=10" (name=FontAwesome, offset=2, file=/usr/share/fonts/awesome-terminal-fonts/fontawesome-regular.ttf)
notice: Loaded font "MaterialIcons:size=10" (name=Material Icons, offset=2, file=/home/marko/.local/share/fonts/material-design-icons.ttf)
notice: Loaded font "SF Pro:size=10" (name=SF Pro, offset=2, file=/home/marko/.local/share/fonts/SF-Pro.ttf)

Seems to be loading right fonts :+1:

1 Like

I know…but why I don’t have those icons and menu ? :wink:

I am satisfied with the center and right side, but left, nothing.

I tried to change icons, text, numbers etc, but nothing. Still can not get normal icons on workspaces, and menu icon…

Don’t know what I am mising.

2021-11-27-18:39:38-screenshot

The icons on right look normal so I don’t see a reason why they’d be missing on left. Can you see the icons in config file when you open it in a text editor?