Polybar icons

Hi, I’ve recently installed ArchLabs and so far I’m loving it. There’s just one minor thing I’m having trouble with, and it’s the icons in polybar!

;;;;;;;;;;;;;;;;;;;
;; i3 Workspaces ;;
;;;;;;;;;;;;;;;;;;;
[module/i3]
type = internal/i3
pin-workspaces = true
strip-wsnumbers = true
index-sort = true
enable-click = true
fuzzy-match = true
ws-icon-default = 
format = <label-state><label-mode>
label-mode = %mode%
label-mode-padding = 2
label-focused = %index% %name%
label-focused-padding = 2
label-unfocused = %index% %name%
label-unfocused-padding = 2
label-visible = %index% %name%
label-visible-padding = 2
label-urgent = %index% %name%
label-urgent-padding = 2
label-mode-underline = ${colors.urgent}
label-focused-underline = ${colors.blue}
label-visible-underline = ${colors.purple}
label-urgent-underline = ${colors.urgent}

This is my config for the i3 module, and I’m not seeing icons anywhere! It’s crazy to me as a long-time polybar user, who only ever used the config file. As far as I knew, icons HAD to be defined as ws-icon-0 = 1:[icon].

So, my questions today are:

  1. Where is polybar getting the icons from, if they aren’t defined in the i3 module?

  2. Where do I go to customize the icons for each workspace to my liking?

  3. Is there any copy/paste kind of cheat sheet for the icons that ship with Archlabs’ polybar? I’d like to keep things as flush as possible.

Thank you in advance to anybody who takes the time to assist! <3

Hi smoke and welcome to the forum,

Polybar gets the icons from the workspaces section in your i3 config, if you changed them you also have to set it in the i3 module : $HOME/.config/i3/config
The polybar definition is also in /etc/skel/.config/polybar
So in $HOME/.config/polybar/modules.conf: module/i3

label-focused = %index% %name% %icon%

or if you whant

label-focused = %index% %icon%

1 Like

hi, thanks for the response. I’m still having trouble finding the icon definitions, I’m not seeing them in /etc/skel/.config/polybar/*, or in .config/polybar/*

Also, the only workspace related definitions I have in .config/i3/config are keybinds for switching and navigating workspaces. I see nothing in there about icons anywhere. Any ideas?

Hi @smoke, welcome to the forum! I was looking for a possible solution to your issue, although I’m surprised that you couldn’t find the icons. Maybe this article will help:

missing polybar icons

and maybe you can find some icons to your liking here:

polybar icon themes

And I’m assuming that you have read the wikis on polybar and i3 configurations. Hopefully these suggestions will help a little. I mainly use openbox or flux myself, but… :thinking:

I’m STILL not finding them! Do you know where your polybar is referencing icons from in Openbox? Maybe it’ll be similar in i3.

How did you isnstall ArchLabs, did you select i3, openbox or something else at that point ?
If so then install archlabs-polybar , archlabs-skel-i3-gaps & i3-gaps packages

I’m guessing you did ‘whereis icons’ to try and find them @smoke? I’m not at my computer right now, but will look up where openbox stores the icons.

Okay, the icons for openbox is located here:

/usr/share/icons

If you have the icons, chances are that polybar doesn’t have the path to them.

Polybar gets it’s icons from the fonts used. In your ~/.config/polybar there will be some config files that are all used - config, master, modules I think. Look in those files and you’ll see a stanza similar to this:

font-0 = "Fira Code:style=regular:size=10:antialias=true:autohint=true;2"
font-1 = "Inconsolata LGC Markup:size=10:bold:antialias=true;2"
font-2 = "DejaVu Sans:size=10:antialias=true:autohint=true;2"
font-3 = "Monofur Nerd Font:size=10:antialias=false;2"

Those are the fonts used in my current config, font-3 “Monofur Nerd Font” is the font that contains the icon glyphs, if that font isn’t installed, I won’t see any icons.

Did you use the recent iso to install ArchLabs? Near the end, when you’re given the option to install packages, font packages for polybar were part of the options (as I recall).

Font Awesome, Nerd Fonts, and Material Icon font are popular for polybar, you can install them with pacman or baph. Then follow @archus post on how to code the configuration to see the icon.

The home page for nerd fonts and font awesome has cheat sheets so you’ll know what’s available.

1 Like