为什么topproc和multicpu都不能在xmobar中正常工作?


1

当使用下面的topproc和multicpu命令时,我收到错误“无法执行命令topproc”和“autototal%not found”。我相信语法是正确的(也不起作用)。我究竟做错了什么?这是来自Ubuntu的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%"
       }

Answers:


3

它只是一个错字,删除%

 Run MultiCpu ["-t", "<autototal>%", "-L","3","-H","50","--normal","green","--high","red"] 10,

1

%topproc%需要更改为%top%。我不知道为什么autototal不起作用,但我选择了“总计”。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.