-
-
Notifications
You must be signed in to change notification settings - Fork 717
Closed
Description
Checklist
- I have read the appropriate section in the contributing guidelines
- I believe this issue is a problem with polybar itself and not a misconfiguration on my part
- I have searched for other open and closed issues that may have already reported this problem
- I have checked the known issues page for this problem.
- I have followed the debugging guide to narrow down the problem to a minimal config.
Steps to reproduce
polybar -r main
Minimal config
[bar/main]
width = 100%
module-margin-left = 2
module-margin-right = 0
modules-right = time tray
[module/tray]
type = internal/tray
format-offset = 0px
format-margin = 0px
format-padding = 0px
tray-padding = 0px
tray-spacing = 8px
Polybar log
No response
Expected behavior
When tray is empty (no active items in tray) rendering it along with the global margins module-margin-left
and module-margin-right
should be skipped to avoid creating unnecessary empty space, I believe this is handled here:
Actual behavior
The empty tray is rendered along with the global margins
Window Manager and Version
bspwm
Linux Distribution
Arch
Polybar version
polybar 3.7.0
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 -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/polybar/src=/usr/src/debug/polybar -flto=auto -O3 -DNDEBUG -Wall -Wextra -Wpedantic -Wdeprecated-copy-dtor -Wsuggest-override
Linker flags: -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto -Wall -Wextra -Wpedantic -Wdeprecated-copy-dtor -Wsuggest-override -Wall -Wextra -Wpedantic -Wdeprecated-copy-dtor -Wsuggest-override
Additional Context / Screenshots
Expected (behavior of legacy tray):
Actual (new internal/tray module):
I suppose this could be tackled in two possible ways:
- mark internal/tray module as not visible when empty and avoid rendering it in the main modules loop
- allow overriding
module-margin-{left,right}
on a per module basis (would give additional flexibility to polybar in general)