Skip to content

conflict between icon for i3wm workspace label "1" and "10" when display by polybar #2095

@lpreaux

Description

@lpreaux

Describe the issue

Expected behavior:
I've ten workspace configure in i3 config labeled from 1 to 10.
In polybar config, for i3 module I use ws-icon-[0-9]+ = <label>;<icon> to have different icon for most of my workspace.
Concerning the bug, I should have a different icon for each 1st and 10th workspace.

Actual behavior:
The 10th workspace takes the 1st workspace icons instead of the of the one configure for it.

Was it working before?

  • Did you also experience this bug in an earlier version of polybar? No.
  • If no, what was the last version where this worked correctly? First time I use Polybar. I'm finishing setting it up

How I configure workspaces in i3wm:
I use variables to define them :

set $ws1 "1"
set $ws2 "2"
...
set $ws10 "10"

then I affect each one to different keybinding, for example with the first :

bindsym $mod+ampersand workspace number $ws1r

Then in polybar module config:

ws-icon-0 = 1;  #This is Font Awesome icon
ws-icon-1 = 2;
ws-icon-2 = 3;
ws-icon-3 = 4;
ws-icon-4 = 5;
ws-icon-5 = 6;
ws-icon-6 = 7;
ws-icon-7 = 8;
ws-icon-8 = 9;
ws-icon-9 = 10;

I've tried two things to see if there was a problem with the icon or if I did something wrong:

  • try ws-icon-9 = "10"; instead of ws-icon-9 = 10; -> no change

  • try to change the label in both i3 config and polybar config :
    I use set $ws10 "ten" and ws-icon-9 = ten;. I could have the right logo (opera logo) but with a -1 before (I suppose because the label is normally a number)
    see the screenshots

Screenshots

Capture d’écran_2020-05-10_23-52-34
Capture d’écran_2020-05-10_23-54-02

(It's a two screen setup)

With the i3 module biger:
Capture d’écran_2020-05-10_23-57-01 Capture d’écran_2020-05-10_23-58-18

With the good icon but the wrong number:
Capture d’écran_2020-05-11_00-07-32

With what I see, I think it could be something I'm doing wrong or a bug in polybar (?)
What I don't understand is why with "ten" it display the right icon but it doesn't with "10"
If you need something else, ask me.
I don't know if you need logs of polybar since it don't seems to be an error.. I'll look logs tomorrow to see if there is any Warnings just in case (It's getting late in France ;) )

Environment:

  • WM:i3 version 4.18.1 (2020-04-23) © 2009 Michael Stapelberg and contributors
  • Distro:

DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=20.0
DISTRIB_CODENAME=Lysia
DISTRIB_DESCRIPTION="Manjaro Linux

  • Output of polybar -vvv:

polybar 3.4.2

Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard

X extensions: +randr (+monitors) +composite +xkb +xrm +xcursor

Build type: Release
Compiler: /usr/bin/c++
Compiler flags: -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -Wextra -Wpedantic -O3 -DNDEBUG
Linker flags: -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions