使用下面的 topproc 和 multicpu 命令时,我收到错误“无法执行命令 topproc”和“未找到 autototal%”。我相信语法是正确的(也不起作用)。我做错了什么?这是来自 Ubuntu precise 的 xmobar 0.13-2
-- http://projects.haskell.org/xmobar/#system-monitor-plugins
Config {
font = "xft:Monospace:pixelsize=11",
-- used to make the bar appear correctly after Mod-q in older xmonad implementations (0.9.x)
-- doesn't seem to do anything anymore (0.10, darcs)
-- lowerOnStart = False,
commands = [
Run TopProc [] 20,
Run TopMem [] 20,
-- Run ThermalZone ["-t","<id>: <temp>C"] 30
-- Run DiskIO Disks [("/", "<read> <write>"), ("sdb1", "<total>")] [] 10
-- CoreTemp
Run Weather "KSFO" ["-t"," <tempC>C","-L","-20","-H","30","--normal","green","--high","red","--low","lightblue"] 36000,
Run MultiCpu ["-t", "<autototal%>%", "-L","3","-H","50","--normal","green","--high","red"] 10,
Run Memory ["-t","Mem: <usedratio>%"] 10,
Run Swap [] 10,
Run Date "%a %b %_d %l:%M" "date" 10,
Run Network "eth0" [] 10,
Run StdinReader
]
, sepChar = "%"
, alignSep = "}{"
, template = "%StdinReader% }{ %topproc% | %topmem% | %eth0% | %multicpu% | %memory% * %swap% <fc=#ee9a00>%date%</fc> | %KSFO%"
}
答案1
这只是拼写错误,删除 %
Run MultiCpu ["-t", "<autototal>%", "-L","3","-H","50","--normal","green","--high","red"] 10,
答案2
%topproc% 需要更改为 %top%。我不知道为什么自动总计不起作用,但我选择了“总计”。