polybar 预留空白失效

2021-03-03 23:20:04 +08:00
 hanssx

cpu 的百分比显示,比如

icon 8% 
icon 18%

我想让它在 polybar 上占的宽度一样,因为 cpu 百分比的变化会让整体 polybar 总是抖动,想变成这样

icon  8%
icon 18%

我看 polybar wiki 上关于 token 的内容,好像设置了最小宽度依然不行,还是在抖动。https://github.com/polybar/polybar/wiki/Formatting

[module/cpu]
type = internal/cpu

; Seconds to sleep between updates
; Default: 1
interval = 1

; Available tags:
;   <label> (default)
;   <bar-load>
;   <ramp-load>
;   <ramp-coreload>
;;format = <label> <ramp-coreload>
format = <label>
format-prefix = 
format-prefix-foreground = ${color.yellow}

; Available tokens:
;   %percentage% (default) - total cpu load averaged over all cores
;   %percentage-sum% - Cumulative load on all cores
;   %percentage-cores% - load percentage for each core
;   %percentage-core[1-9]% - load percentage for specific core
label = " %percentage:2:2%%"

; Spacing between individual per-core ramps
;;ramp-coreload-spacing = 1
;;ramp-coreload-0 = ${cpu.load0}
;;ramp-coreload-1 = ${cpu.load1}

;;ramp-load-0 = ${cpu.load0}
;;ramp-load-1 = ${cpu.load1}

;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

1586 次点击
所在节点    Linux
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/758207

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX