V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
hanssx
V2EX  ›  Linux

polybar 预留空白失效

  •  
  •   hanssx · 2021-03-03 23:20:04 +08:00 · 1583 次点击
    这是一个创建于 1142 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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}
    
    ;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
    
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5693 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 02:19 · PVG 10:19 · LAX 19:19 · JFK 22:19
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.