Skip to content

Polybar doesn't recognize VGA monitor width, causes error to launch #1794

@ghost

Description

Describe the issue

polybar example doesn't work because polybar doesn't recognize exteranal monitor width

Expected behavior:

A working polybar

Actual behavior:

polybar -m output:

VGA1: 0x900+0+0
LVDS1: 1600x900+0+0 (primary)

Width for some reason is zero

Was it working before?

No, I just installed it from AUR

To Reproduce

polybar config

[bar/example]
monitor = VGA1
width = 5%
height = 27
;offset-x = 1%
;offset-y = 1%
radius = 6.0
fixed-center = false


Polybar Log

$ polybar example
error: Resulting bar width is out of bounds (0)

Environment:

  • WM: i3-gaps
  • Distro: Arch Linux
  • Output of polybar -vvv: polybar 3.3.1
Features: +alsa +curl +i3 -mpd +network(libnl) +pulseaudio +xkeyboard

X extensions: +randr (+monitors) -render -damage -sync +composite +xkb +xrm +xcursor

Build type: RelWithDebInfo
Compiler: /usr/bin/c++
Compiler flags: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -Wall -Wextra -Werror -Wno-noexcept-type -pedantic -pedantic-errors
Linker flags: -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now

XRandr output:

$ xrandr -q | grep -w connected
LVDS1 connected primary 1600x900+0+0 (normal left inverted right x axis y axis) 310mm x 170mm
VGA1 connected 1440x900+0+0 (normal left inverted right x axis y axis) 410mm x 260mm   

$ xrandr --listmonitors
Monitors: 2
 0: +*LVDS1 1600/310x900/170+0+0  LVDS1
 1: +VGA1 1440/410x900/260+0+0  VGA1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions