polybar / polybar

A fast and easy-to-use status bar
https://polybar.github.io
MIT License
14.19k stars 710 forks source link

[Bug]: `px` is treated as spaces. #2678

Closed ilexite closed 2 years ago

ilexite commented 2 years ago

Checklist

Steps to reproduce

  1. polybar -c minimal.ini minimal
  2. observe

Minimal config

[colors]
bg1 = #282c34
bg2 = #2f333d
fg = #979fad

[bar/minimal]
font-0 = JetBrains Mono:size=14;4

; 30 pixels - correct
height = 30px

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

; 5 spaces, not pixels - incorrect
module-margin = 5px

modules-left = foo bar baz

[module/foo]
type = custom/text
content = "first label; in the correct place"
content-background = ${colors.bg2}

; 5 spaces, not pixels - incorrect
content-padding = 5px

[module/bar]
type = custom/text
content = "second label; too much offset"
content-background = ${colors.bg2}

; 5 spaces, not pixels - incorrect
content-padding = 5px

[module/baz]
type = custom/text
content = "third label; same issue"
content-background = ${colors.bg2}

; 5 spaces, not pixels - incorrect
content-padding = 5px

Polybar log

notice: Parsing config file: .config/polybar/minimal.ini
notice: Loaded font "JetBrains Mono:size=14" (name=JetBrains Mono, offset=4, file=/usr/share/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf)
notice: Termination signal received, shutting down...

Expected behavior

I expected modules to have 5px of padding and 10px in-between one another.

Actual behavior

modules were 10 spaces away from each other and had 5 spaces of padding.

Window Manager and Version

dwm 6.3

Linux Distribution

Gentoo 5.15.14

Polybar version

polybar 3.5.7

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

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

Build type: Gentoo
Compiler: /usr/bin/x86_64-pc-linux-gnu-g++
Compiler flags: -march=native -O2 -pipe -Wall -Wextra -Wpedantic
Linker flags: -Wl,-O1 -Wl,--as-needed

Additional Context / Screenshots

No response

patrick96 commented 2 years ago

That's a version 3.6 feature, you are still using an older version