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}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_