8000 format-NAME-prefix-fg overrides format-NAME-fg · Issue #544 · polybar/polybar · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

format-NAME-prefix-fg overrides format-NAME-fg #544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alexciarlillo opened this issue Apr 19, 2017 · 8 comments
Closed

format-NAME-prefix-fg overrides format-NAME-fg #544

alexciarlillo opened this issue Apr 19, 2017 · 8 comments

Comments

@alexciarlillo
Copy link
alexciarlillo commented Apr 19, 2017

Setting foreground/background colors on the prefix seem to override the "regular" set values. e.g.:


format-volume-prefix-background = ${colors.white}
format-volume-prefix-foreground = ${colors.black}
format-volume-background = ${colors.black} // these 
format-volume-foreground = ${colors.white} // dont get applied

It seems that the colors are not being reset to the proper values after the prefix is printed. Or am I just doing something wrong?

@jaagr
Copy link
Member
jaagr commented Apr 19, 2017

Could be a bug. Could you post one output line from running polybar with the -s flag?

@alexciarlillo
Copy link
Author

I created a simplified bar to test this. Here is the config and the -s output:

config:

[colors]
black = ${xrdb:color0:#282828}
white = ${xrdb:color15:#ebdbb2}

[bar/test]
width = 100%
height = 25
radius = 0
fixed-center = true

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

font-0 = "Hack:size=10;2"
font-1 = "FontAwesome:size=10;2"
font-2 = "Hack:size=20;3"

modules-left =
modules-center = voltest
modules-right =

[module/voltest]
type = internal/volume

format-volume-padding = 0
format-volume-background = ${colors.white}
format-volume-foreground = ${colors.black}
format-volume-prefix-background = ${colors.black}
format-volume-prefix-foreground = ${colors.white}
format-volume-prefix = " prefix "
format-volume = "<label-volume> <bar-volume> "
label-volume = " "

format-muted = <label-muted>
label-muted = " muted "

bar-volume-width = 8
bar-volume-gradient = false
bar-volume-indicator = 
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.white}

output:

ciarlill@mervyn2 ~ $ polybar test -s
warn: No monitor specified, using "eDP1"
%{c}%{A1:volmute: A4:volup: A5:voldown: B#ebdbb2 F#282828 B#282828 F#ebdbb2} prefix %{B- F-}  %{T2}──────%{T2}%{T- F#ebdbb2 T2}─%{T- F-} %{F- B- A A A}

@jaagr
Copy link
Member
jaagr commented Apr 20, 2017

Thanks I'll have a closer look at it after work.

@jaagr
Copy link
Member
jaagr commented Apr 21, 2017

We'll have to create a value stack for some formatting tags to be able to pop to the previous value because now the resetting (e.g. %{F-}) only sets the default value defined for the bar.

@alexciarlillo
Copy link
Author

That makes sense. Thanks for looking into it. I have found workarounds for what I was trying to accomplish using inline manual formatting. A little verbose, but the approach should work for anyone else that runs into this.

@jaagr
Copy link
Member
jaagr commented Apr 25, 2017

@alexciarlillo I implemented a color value stack. Please try it out.

@patrick96
Copy link
Member

I think this should be fixed as well with #729. @alexciarlillo could you please test, if this is now fixed for you, it seems to be fixed on my end

@alexciarlillo
Copy link
Author

Yes. I was able to do a bit of testing last night and it appears to work fine. Thanks for the great work!

patrick96 added a commit that referenced this issue Dec 3, 2017
Breaking Changes:

* Date module no longer supports non-padded specifiers (i.e. `%-d`) and potentially other specifiers, see #792
  - Check http://en.cppreference.com/w/cpp/io/manip/put_time to see supported specifiers
* Setting background color to `background-0` with gradients (refer to https://github.com/jaagr/polybar/wiki/Known-Issues)

Changelog:

Features:
* Feat(mpd): State-specific formats (`format-playing`, `format-paused`, `format-stopped`) (#567), see #524 
* Feat(ipc): Visibility commands (show, hide, toggle, restart, quit) (b6c5563)
* Feat(shell): Bash completion (#588)
* Feat(menu): `expand-right` option (#658), see #655
* Feat(temperature): hwmon sysfs support (#688), see #404 
* Feat(cursor): Change cursors over clickable/scrollable areas (#727), see #721  
* Feat(temperature): Fahrenheit and Celsius tokens (#804)
* Feat(mpd): Use mpd name tag or URI as fallback for title-less tracks (#823), see #815 

Fixes:
* Fix(i3): Clicking workspaces without index (#521), see #520 
* Fix(parser): Prefix options overriding format options (#729), see #544
* Fix(parser): Overline tags (eebf105)
* Fix(process_util): Prefix shell environment variable (`$POLYBAR_SHELL`) (86ff947), see #566 
* Fix(parser): `%{R}` tag (reverse colors) (0bd8f1f), see #585 
* Fix(renderer): Center block position with tray (389bae2 & #673), see #551 & #672 
* Fix(xworkpaces): Active workspace with XMonad (#587), see #411 & #535 
* Fix(config): Expand tilde, environment variable (d3b0670 & #724), see #603 & #719 
* Fix(build): Remove curlbuild.h (#648), see #647 
* Fix(renderer): Off by one error for actions (#663), see #661 
* Fix(gcc): GCC 7.1 ([jaagr/xpp/#6](polybar/xpp#6))
* Fix(fs): Use `bytes_available` for `percentage_used` (138f5fa), see #710
* Fix(fs): Use `f_frsize` for calculations (a682d2a)
* Fix(date): Remove date string length limitation (#745), see #754 
* Fix(renderer): Nested actions (#772), see #760 and #758
* Fix(i3): Check and warn if current workspace not found (#826), see #824 
* Fix(github): Prevent module disappearing with no connection (#811), see #810 
* Fix(renderer): Module gradients (#831), see #759 
* Fix(build): Update deprecated jsoncpp Reader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0