Skip to content

Separator with a different foreground #1913

@infokiller

Description

@infokiller

I want to configure polybar to use a module separator with a foreground that's different from the regular bar foreground. Example:
image

I tried to use the following in my bar section but that didn't work:

separator = "|"
separator-padding = 1
separator-foreground = ${colors.foreground-alt}

So, as a workaround, I added the following simple text module:

; Workaround for using a module separator with a different foreground color than
; the one defined for the whole bar.
[module/sep]
type = custom/text
content = |
content-foreground = ${colors.foreground-alt}
content-padding = 1

And then I add the sep module between every pair of modules, for example:

modules-right = filesystem sep memory sep cpu sep keyboard-layout sep

This worked fine for some time, but recently after upgrading polybar it started printing this error:

error: The module "module/sep" appears multiple times in your modules list. This is deprecated and should be avoided, as it can lead to inconsistent behavior. Both modules will be displayed for now.

I traced this back to #1534

I don't want my config to break in a future upgrade, hence I opened this issue to ask how to handle this.

Thanks!

CC @patrick96

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions