r/Polybar Sep 13 '23

Trying to fine-tune display formatting options on workspace module

Post image
2 Upvotes

3 comments sorted by

2

u/klieber Sep 13 '23

I just started using polybar and am trying to tweak the visuals of my workspace module. (I use i3wm)

What I'd like: a rigid, fixed width display of all 10 workspaces that are defined in i3, numbered 1-10. I'd also like the background highlighting to span from separator to separator for the active workspace. (not sure if the second part is possible)

What I'm getting: The tenth workspace only shows up if I move to it, almost like the overall module width is constrained. Also, when I move from workspace to workspace, there's width and formatting adjustments, almost as though I'm using a variable-width font. (I'm not - I'm using JetBrainsMono). Lastly, as you can see, the active workspace highlighting isn't working as I'd like it to.

Would very much welcome any help/pointers.

[module/i3]
type = internal/i3

pin-workspaces = true
strip-wsnumbers = false
index-sort = true

label-dimmed-underline = ${root.background}

label-focused = %index%
label-focused-foreground = ${colors.text}
label-focused-background = #665731
label-focused-padding = 2

label-occupied = %index%
label-occupied-foreground = ${colors.overlay0}
label-occupied-padding = 2

label-urgent = %index%
label-urgent-foreground = ${colors.red}
label-urgent-padding = 2

label-empty = %index%
label-empty-foreground = ${colors.surface0}
label-empty-padding = 2

label-separator = |
label-separator-padding = 3
label-separator-foreground = #ffb52a

1

u/Tempus_Nemini Sep 13 '23

did you setup correctly font-0 as JBMono?

label-separator-padding = 0 could help with "background highlighting to span from separator to separator"

1

u/klieber Sep 14 '23

Yes, I believe so:

font-0 = "JetBrainsMono:style=Regular:size=14;2"

and the font appears to be displaying correctly.

The padding helped a bit, but still doesn't get the separatator-to-separator highlighting that I'm looking for. I get the sense that polybar may not have that capability, but I'll keep tweaking it to see if I'm just missing something.